This is an automated email from the ASF dual-hosted git repository.
pefernan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-apps.git
The following commit(s) were added to refs/heads/main by this push:
new ae8aff83c incubator-kie-issues#1408: Enable a JPA version of the Data
Index Addons (#2085)
ae8aff83c is described below
commit ae8aff83c4b032a8f304f49485d8c06cfa70cf9a
Author: Pere Fernández <[email protected]>
AuthorDate: Wed Jul 31 18:34:01 2024 +0200
incubator-kie-issues#1408: Enable a JPA version of the Data Index Addons
(#2085)
* incubator-kie-issues#1408: Enable a JPA version of the Data Index Addons
* fix build
* Fix ProcessDefinitionRegister: setting right ProcessDefinition type on
register
* Remove non standard SQL syntax
---
.../data-index-storage-jpa-common/pom.xml | 2 +-
.../data-index-storage-jpa/pom.xml | 11 +-
.../db/migration/V1.33.0__data_index_create.sql | 18 +--
.../migration/V1.44.0__data_index_definitions.sql | 26 ++---
.../V1.45.0.0__data_index_node_definitions.sql | 22 ++--
....45.0.2__data_index_definitions_add_colums.sql} | 16 +--
.../db/migration/V1.45.0.3__add_fk_index.sql | 36 ++++++
....sql => V1.45.0.4__increase_varchar_length.sql} | 0
.../index/addon/ProcessDefinitionRegister.java | 2 +-
.../deployment/pom.xml | 70 +++++++++++
.../JPASQLDataIndexPersistenceProcessor.java | 41 +++++++
.../integration-tests-process/pom.xml | 130 +++++++++++++++++++++
.../main/resources/META-INF/processSVG/hello.svg | 71 +++++++++++
.../src/main/resources/application.properties | 34 ++++++
.../src/main/resources/hello.bpmn | 47 ++++++++
.../JPAQuarkusAddonDataIndexPersistenceTest.java | 113 ++++++++++++++++++
.../integration-tests-sw/pom.xml | 129 ++++++++++++++++++++
.../src/main/resources/application.properties | 35 ++++++
.../src/main/resources/greet.sw.json | 71 +++++++++++
.../JPAQuarkusAddonDataIndexPersistenceTest.java | 112 ++++++++++++++++++
.../pom.xml | 27 +++--
.../runtime/pom.xml | 81 +++++++++++++
.../main/resources/META-INF/quarkus-extension.yaml | 35 ++++++
.../src/main/resources/application.properties | 27 +++++
.../pom.xml | 1 +
.../deployment/pom.xml | 83 +++++++++++++
.../index/deployment/JPADataIndexProcessor.java | 48 ++++++++
.../main/resources/dev-templates/dataindex.html | 12 ++
.../src/main/resources/dev-templates/embedded.html | 4 +
.../integration-tests-process/pom.xml | 120 +++++++++++++++++++
.../main/resources/META-INF/processSVG/hello.svg | 71 +++++++++++
.../src/main/resources/application.properties | 35 ++++++
.../src/main/resources/hello.bpmn | 47 ++++++++
.../data/index/it/JPAQuarkusAddonDataIndexIT.java | 85 ++++++++++++++
.../integration-tests-sw/pom.xml | 116 ++++++++++++++++++
.../src/main/resources/application.properties | 35 ++++++
.../src/main/resources/greet.sw.json | 71 +++++++++++
.../data/index/it/JPAQuarkusAddonDataIndexIT.java | 87 ++++++++++++++
.../pom.xml | 28 ++---
.../runtime/pom.xml | 81 +++++++++++++
.../main/resources/META-INF/quarkus-extension.yaml | 38 ++++++
.../src/main/resources/application.properties | 28 +++++
.../kogito-addons-quarkus-data-index/pom.xml | 1 +
kogito-apps-bom/pom.xml | 56 ++++++++-
.../pom.xml | 6 +-
.../kogito/persistence/postgresql/Constants.java | 0
.../persistence/postgresql/PostgresQuery.java | 0
.../persistence/postgresql/PostgresStorage.java | 0
.../postgresql/PostgresStorageService.java | 0
.../postgresql/hibernate/JsonBinaryConverter.java | 0
.../postgresql/hibernate/JsonBinaryType.java | 0
.../persistence/postgresql/model/CacheEntity.java | 0
.../postgresql/model/CacheEntityRepository.java | 0
.../persistence/postgresql/model/CacheId.java | 0
.../src/main/resources/META-INF/beans.xml | 0
.../persistence-commons-jpa/pom.xml | 33 +-----
...1.5.0__kogito_apps_create_kogito_data_cache.sql | 7 +-
.../persistence-commons-postgresql/pom.xml | 2 +-
...1.5.0__kogito_apps_create_kogito_data_cache.sql | 8 +-
persistence-commons/pom.xml | 1 +
60 files changed, 2150 insertions(+), 110 deletions(-)
diff --git
a/data-index/data-index-storage/data-index-storage-jpa-common/pom.xml
b/data-index/data-index-storage/data-index-storage-jpa-common/pom.xml
index d9d262ac0..d73021827 100644
--- a/data-index/data-index-storage/data-index-storage-jpa-common/pom.xml
+++ b/data-index/data-index-storage/data-index-storage-jpa-common/pom.xml
@@ -48,7 +48,7 @@
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
- <artifactId>persistence-commons-jpa</artifactId>
+ <artifactId>persistence-commons-jpa-base</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
diff --git a/data-index/data-index-storage/data-index-storage-jpa/pom.xml
b/data-index/data-index-storage/data-index-storage-jpa/pom.xml
index d5b70212b..7e52547f1 100644
--- a/data-index/data-index-storage/data-index-storage-jpa/pom.xml
+++ b/data-index/data-index-storage/data-index-storage-jpa/pom.xml
@@ -42,14 +42,19 @@
<artifactId>data-index-storage-jpa-common</artifactId>
</dependency>
<dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-test-h2</artifactId>
- <scope>test</scope>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>persistence-commons-jpa</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-h2</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-test-h2</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-storage-api</artifactId>
diff --git
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.33.0__data_index_create.sql
b/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.33.0__data_index_create.sql
index 5d315351d..564a9c72e 100644
---
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.33.0__data_index_create.sql
+++
b/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.33.0__data_index_create.sql
@@ -43,16 +43,16 @@ create table jobs
id varchar(255) not null,
callback_endpoint varchar(255),
endpoint varchar(255),
- execution_counter NUMBER(10),
+ execution_counter integer,
expiration_time timestamp,
last_update timestamp,
node_instance_id varchar(255),
- priority NUMBER(10),
+ priority integer,
process_id varchar(255),
process_instance_id varchar(255),
- repeat_interval NUMBER(19),
- repeat_limit NUMBER(10),
- retries NUMBER(10),
+ repeat_interval bigint,
+ repeat_limit integer,
+ retries integer,
root_process_id varchar(255),
root_process_instance_id varchar(255),
scheduled_id varchar(255),
@@ -97,8 +97,8 @@ create table processes
root_process_id varchar(255),
root_process_instance_id varchar(255),
start_time timestamp,
- state NUMBER(10),
- variables blob,
+ state integer,
+ variables varbinary(max),
CONSTRAINT processes_pk PRIMARY KEY (id),
CONSTRAINT processes_variables_json CHECK (variables IS JSON)
);
@@ -124,10 +124,10 @@ create table tasks
completed timestamp,
description varchar(255),
endpoint varchar(255),
- inputs blob,
+ inputs varbinary(max),
last_update timestamp,
name varchar(255),
- outputs blob,
+ outputs varbinary(max),
priority varchar(255),
process_id varchar(255),
process_instance_id varchar(255),
diff --git
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.44.0__data_index_definitions.sql
b/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.44.0__data_index_definitions.sql
index 96b2ec5f0..4f361d57c 100644
---
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.44.0__data_index_definitions.sql
+++
b/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.44.0__data_index_definitions.sql
@@ -19,28 +19,28 @@
create table definitions
(
- id varchar2(255 char) not null,
- version varchar2(255 char) not null,
- name varchar2(255 char),
- source blob,
- type varchar2(255 char),
- endpoint varchar2(255 char),
+ id varchar2(255) not null,
+ version varchar2(255) not null,
+ name varchar2(255),
+ source bytea,
+ type varchar2(255),
+ endpoint varchar2(255),
primary key (id, version)
);
create table definitions_addons
(
- process_id varchar2(255 char) not null,
- process_version varchar2(255 char) not null,
- addon varchar2(255 char) not null,
+ process_id varchar2(255) not null,
+ process_version varchar2(255) not null,
+ addon varchar2(255) not null,
primary key (process_id, process_version, addon)
);
create table definitions_roles
(
- process_id varchar2(255 char) not null,
- process_version varchar2(255 char) not null,
- role varchar2(255 char) not null,
+ process_id varchar2(255) not null,
+ process_version varchar2(255) not null,
+ role varchar2(255) not null,
primary key (process_id, process_version, role)
);
@@ -57,4 +57,4 @@ alter table definitions_roles
on delete cascade;
alter table processes
- add version varchar2(255 char);
\ No newline at end of file
+ add column version varchar2(255);
\ No newline at end of file
diff --git
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.0__data_index_node_definitions.sql
b/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.0__data_index_node_definitions.sql
index ee98614a4..7bce973a3 100644
---
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.0__data_index_node_definitions.sql
+++
b/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.0__data_index_node_definitions.sql
@@ -19,22 +19,22 @@
create table definitions_nodes
(
- id varchar2(255 char) not null,
- name varchar2(255 char),
- type varchar2(255 char),
- unique_id varchar2(255 char),
- process_id varchar2(255 char) not null,
- process_version varchar2(255 char) not null,
+ id varchar2(255) not null,
+ name varchar2(255),
+ type varchar2(255),
+ unique_id varchar2(255),
+ process_id varchar2(255) not null,
+ process_version varchar2(255) not null,
primary key (id, process_id, process_version)
);
create table definitions_nodes_metadata
(
- node_id varchar2(255 char) not null,
- process_id varchar2(255 char) not null,
- process_version varchar2(255 char) not null,
- value varchar2(255 char),
- key varchar2(255 char) not null,
+ node_id varchar2(255) not null,
+ process_id varchar2(255) not null,
+ process_version varchar2(255) not null,
+ value varchar2(255),
+ key varchar2(255) not null,
primary key (node_id, process_id, process_version, key)
);
diff --git
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.2__data_index_definitions_add_collums.sql
b/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.2__data_index_definitions_add_colums.sql
similarity index 78%
rename from
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.2__data_index_definitions_add_collums.sql
rename to
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.2__data_index_definitions_add_colums.sql
index 00ec3ce93..8abae1b55 100644
---
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.2__data_index_definitions_add_collums.sql
+++
b/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.2__data_index_definitions_add_colums.sql
@@ -19,18 +19,18 @@
create table definitions_annotations
(
- value varchar2(255 char) not null,
- process_id varchar2(255 char) not null,
- process_version varchar2(255 char) not null,
+ value varchar2(255) not null,
+ process_id varchar2(255) not null,
+ process_version varchar2(255) not null,
primary key (value, process_id, process_version)
);
create table definitions_metadata
(
- process_id varchar2(255 char) not null,
- process_version varchar2(255 char) not null,
- value varchar2(255 char),
- key varchar2(255 char) not null,
+ process_id varchar2(255) not null,
+ process_version varchar2(255) not null,
+ value varchar2(255),
+ key varchar2(255) not null,
primary key (process_id, process_version, key)
);
@@ -47,5 +47,5 @@ alter table definitions_metadata
on delete cascade;
alter table definitions
- add (description varchar2(255 char));
+ add (description varchar2(255));
diff --git
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.3__add_fk_index.sql
b/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.3__add_fk_index.sql
new file mode 100644
index 000000000..c8cc1c3a6
--- /dev/null
+++
b/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.3__add_fk_index.sql
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+create index idx_attachments_tid on attachments(task_id);
+create index idx_comments_tid on comments(task_id);
+create index idx_definitions_addons_pid_pv on definitions_addons(process_id,
process_version);
+create index idx_definitions_annotations_pid_pv on
definitions_annotations(process_id, process_version);
+create index idx_definitions_metadata_pid_pv on
definitions_metadata(process_id, process_version);
+create index idx_definitions_nodes_pid_pv on definitions_nodes(process_id,
process_version);
+create index idx_definitions_nodes_metadata_pid_pv on
definitions_nodes_metadata(process_id, process_version);
+create index idx_definitions_roles_pid_pv on definitions_roles(process_id,
process_version);
+create index idx_milestones_piid on milestones(process_instance_id);
+create index idx_nodes_piid on nodes(process_instance_id);
+create index idx_processes_addons_pid on processes_addons(process_id);
+create index idx_processes_roles_pid on processes_roles(process_id);
+create index idx_tasks_admin_groups_tid on tasks_admin_groups(task_id);
+create index idx_tasks_admin_users_tid on tasks_admin_users(task_id);
+create index idx_tasks_excluded_users_tid on tasks_excluded_users(task_id);
+create index idx_tasks_potential_groups_tid on tasks_potential_groups(task_id);
+create index idx_tasks_potential_users_tid on tasks_potential_users(task_id);
diff --git
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.3__increase_varchar_length.sql
b/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.4__increase_varchar_length.sql
similarity index 100%
copy from
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.3__increase_varchar_length.sql
copy to
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.4__increase_varchar_length.sql
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/ProcessDefinitionRegister.java
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/ProcessDefinitionRegister.java
index b291feb5d..8dcd70904 100644
---
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/ProcessDefinitionRegister.java
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/ProcessDefinitionRegister.java
@@ -71,7 +71,7 @@ public class ProcessDefinitionRegister {
pd.setId(p.id());
pd.setName(p.name());
pd.setVersion(p.version());
- pd.setType(pd.getType());
+ pd.setType(p.type());
pd.setAddons(addons);
// See ProcessInstanceEventBatch.buildSource
pd.setEndpoint(endpoint + "/" + (p.id().contains(".") ?
p.id().substring(p.id().lastIndexOf('.') + 1) : p.id()));
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/deployment/pom.xml
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/deployment/pom.xml
new file mode 100644
index 000000000..0fadc66e6
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/deployment/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-parent</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-deployment</artifactId>
+ <name>Kogito Apps :: Kogito Addons Quarkus Data Index Persistence JPA ::
Deployment</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-common-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-persistence-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-flyway-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-hibernate-orm-panache-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jdbc-h2-deployment</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-processor</artifactId>
+ <version>${version.io.quarkus}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/JPASQLDataIndexPersistenceProcessor.java
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/JPASQLDataIndexPersistenceProcessor.java
new file mode 100644
index 000000000..ef3d052f6
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/JPASQLDataIndexPersistenceProcessor.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.addons.quarkus.data.index.persistence.deployment;
+
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import
io.quarkus.deployment.builditem.nativeimage.NativeImageResourcePatternsBuildItem;
+import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild;
+
+public class JPASQLDataIndexPersistenceProcessor extends
AbstractKogitoAddonsQuarkusDataIndexPersistenceProcessor {
+
+ private static final String FEATURE =
"kogito-addons-quarkus-data-index-persistence-jpa";
+
+ @BuildStep
+ public FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+ @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
+ public void
addNativeResources(BuildProducer<NativeImageResourcePatternsBuildItem>
resources) {
+ resources.produce(new
NativeImageResourcePatternsBuildItem.Builder().includeGlob("sql/*.sql").build());
+ }
+
+}
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/pom.xml
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/pom.xml
new file mode 100644
index 000000000..dc97fc454
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/pom.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-parent</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-integration-tests-process</artifactId>
+ <name>Kogito Apps :: Kogito Addons Quarkus Data Index Persistence JPA ::
Integration Tests :: Process</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-quarkus</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy-jackson</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-persistence-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-persistence-jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-process-svg</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-agroal</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jdbc-h2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-test-h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <version>${version.io.quarkus}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>native</id>
+ <activation>
+ <property>
+ <name>native</name>
+ </property>
+ </activation>
+ <properties>
+ <quarkus.package.type>native</quarkus.package.type>
+ <failsafe.include>**/*IT.java</failsafe.include>
+ </properties>
+ </profile>
+ </profiles>
+</project>
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
new file mode 100644
index 000000000..716974fb8
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
@@ -0,0 +1,71 @@
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="563" height="393" viewBox="0
0 563 393">
+ <defs/>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g>
+ <g>
+ <g>
+ <path fill="none" stroke="#d3d3d3" paint-order="fill stroke markers"
d=" M 0 0 L 1200 0" stroke-miterlimit="10" stroke-opacity="0.8"
stroke-dasharray="5"/>
+ </g>
+ <g>
+ <path fill="none" stroke="#d3d3d3" paint-order="fill stroke markers"
d=" M 0 0 L 0 800" stroke-miterlimit="10" stroke-opacity="0.8"
stroke-dasharray="5"/>
+ </g>
+ </g>
+ <g id="_C3F8BD7A-55E5-4513-8C0D-5576F8099167"
bpmn2nodeid="_C3F8BD7A-55E5-4513-8C0D-5576F8099167"
transform="matrix(1,0,0,1,321,287)">
+ <g>
+ <path fill="none" stroke="none"/>
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path fill="#e8fae6" stroke="black"
id="_C3F8BD7A-55E5-4513-8C0D-5576F8099167?shapeType=BACKGROUND"
paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C
394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444
C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5
334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4
184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001
80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8
13.8 334.5 33.6 C 368.2 53.400000000000 [...]
+ stroke-miterlimit="10" stroke-dasharray=""/>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path fill="rgb(74,162,65)" stroke="black"
id="_C3F8BD7A-55E5-4513-8C0D-5576F8099167?shapeType=BORDER&renderType=FILL"
paint-order="fill stroke markers"
+ d=" M 0 0 M 224 0 C 100.3 0 0 100.3 0 224 C 0 347.7
100.3 448 224 448 C 347.7 448 448 347.7 448 224 C 448 100.30000000000001 347.7
0 224 0 Z M 0 0 M 224 432 C 109.1 432 16 338.9 16 224 C 16 109.10000000000002
109.1 16 224 16 C 338.9 16 432 109.1 432 224 C 432 338.9 338.9 432 224 432 Z"
+ stroke-miterlimit="10" stroke-dasharray=""/>
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)"/>
+ </g>
+ <g transform="matrix(1,0,0,1,321,287)"/>
+ <g id="_B3241ACF-97BE-443B-A49F-964AB3DD006C"
bpmn2nodeid="_B3241ACF-97BE-443B-A49F-964AB3DD006C"
transform="matrix(1,0,0,1,457,287)">
+ <g>
+ <path fill="none" stroke="none"/>
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path fill="#fce7e7" stroke="black"
id="_B3241ACF-97BE-443B-A49F-964AB3DD006C?shapeType=BACKGROUND"
paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C
394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444
C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5
334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4
184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001
80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8
13.8 334.5 33.6 C 368.2 53.400000000000 [...]
+ stroke-miterlimit="10" stroke-dasharray=""/>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path fill="rgb(0,136,206)" stroke="black"
id="_B3241ACF-97BE-443B-A49F-964AB3DD006C?shapeType=BORDER&renderType=FILL"
paint-order="fill stroke markers"
+ d=" M 0 0 M 224 0 C 100.3 0 0 100.3 0 224 C 0 347.7
100.3 448 224 448 C 347.7 448 448 347.7 448 224 C 448 100.30000000000001 347.7
0 224 0 Z M 0 0 M 224 400 C 126.8 400 48 321.2 48 224 C 48 126.80000000000001
126.8 48 224 48 C 321.2 48 400 126.8 400 224 C 400 321.2 321.2 400 224 400 Z"
+ stroke-miterlimit="10" stroke-dasharray=""/>
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)"/>
+ </g>
+ <g transform="matrix(1,0,0,1,457,287)"/>
+ <g id="_9FD38FF8-A530-41E7-8EA0-E1F71353CBB3"
bpmn2nodeid="_9FD38FF8-A530-41E7-8EA0-E1F71353CBB3">
+ <g>
+ <path fill="none" stroke="#000000" paint-order="fill stroke markers"
d=" M 377 315 L 442 315" stroke-miterlimit="10" stroke-dasharray=""/>
+ </g>
+ <g transform="matrix(1,0,0,1,377,315)"/>
+ <g
transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,457,310)">
+ <path fill="#000000" stroke="#000000" paint-order="fill stroke
markers" d=" M 10 15 L 0 15 L 5 0 Z" stroke-miterlimit="10"
stroke-dasharray=""/>
+ </g>
+ <g transform="matrix(1,0,0,1,377,305)"/>
+ </g>
+ </g>
+ </g>
+</svg>
\ No newline at end of file
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/application.properties
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/application.properties
new file mode 100644
index 000000000..d9cdfadcd
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/application.properties
@@ -0,0 +1,34 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+kogito.service.url=http://localhost:8080
+kogito.persistence.type=jdbc
+quarkus.flyway.migrate-at-start=true
+
+quarkus.datasource.db-kind=h2
+quarkus.datasource.username=kogito
+quarkus.datasource.jdbc.url=jdbc:h2:mem:default;NON_KEYWORDS=VALUE,KEY
+
+# Not using Keycloak Dev service in test
+quarkus.keycloak.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/hello.bpmn
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/hello.bpmn
new file mode 100644
index 000000000..939c411bb
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/main/resources/hello.bpmn
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions 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" xmlns:xsi="xsi"
id="_hT2oIPJzEDuE8tm0q8uK_w"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www.jboss.org/drools drools.xsd http://www [...]
+ <bpmn2:collaboration id="_4326C578-FDBD-4F8C-BAB8-5C9CFE867882"
name="Default Collaboration">
+ <bpmn2:participant id="_B70F49F9-D9BE-4BCD-A095-2601433AD6F7" name="Pool
Participant" processRef="hello"/>
+ </bpmn2:collaboration>
+ <bpmn2:process id="hello" drools:packageName="com.example"
drools:version="1.0" drools:adHoc="false" name="hello" isExecutable="true"
processType="Public">
+ <bpmn2:sequenceFlow id="_9FD38FF8-A530-41E7-8EA0-E1F71353CBB3"
sourceRef="_C3F8BD7A-55E5-4513-8C0D-5576F8099167"
targetRef="_B3241ACF-97BE-443B-A49F-964AB3DD006C"/>
+ <bpmn2:endEvent id="_B3241ACF-97BE-443B-A49F-964AB3DD006C">
+ <bpmn2:incoming>_9FD38FF8-A530-41E7-8EA0-E1F71353CBB3</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="_C3F8BD7A-55E5-4513-8C0D-5576F8099167">
+ <bpmn2:outgoing>_9FD38FF8-A530-41E7-8EA0-E1F71353CBB3</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="hello">
+ <bpmndi:BPMNShape id="shape__C3F8BD7A-55E5-4513-8C0D-5576F8099167"
bpmnElement="_C3F8BD7A-55E5-4513-8C0D-5576F8099167">
+ <dc:Bounds height="56" width="56" x="321" y="287"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__B3241ACF-97BE-443B-A49F-964AB3DD006C"
bpmnElement="_B3241ACF-97BE-443B-A49F-964AB3DD006C">
+ <dc:Bounds height="56" width="56" x="457" y="287"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge
id="edge_shape__C3F8BD7A-55E5-4513-8C0D-5576F8099167_to_shape__B3241ACF-97BE-443B-A49F-964AB3DD006C"
bpmnElement="_9FD38FF8-A530-41E7-8EA0-E1F71353CBB3">
+ <di:waypoint x="349" y="315"/>
+ <di:waypoint x="485" y="315"/>
+ </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="_C3F8BD7A-55E5-4513-8C0D-5576F8099167">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ </bpsim:ElementParameters>
+ </bpsim:Scenario>
+ </bpsim:BPSimData>
+ </bpmn2:extensionElements>
+ <bpmn2:source>_hT2oIPJzEDuE8tm0q8uK_w</bpmn2:source>
+ <bpmn2:target>_hT2oIPJzEDuE8tm0q8uK_w</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
\ No newline at end of file
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexPersistenceTest.java
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexPersistenceTest.java
new file mode 100644
index 000000000..5c3e306d0
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexPersistenceTest.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.addons.quarkus.data.index.it;
+
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.kie.kogito.index.jpa.storage.ProcessDefinitionEntityStorage;
+import org.kie.kogito.index.jpa.storage.ProcessInstanceEntityStorage;
+import org.kie.kogito.index.model.ProcessDefinition;
+import org.kie.kogito.index.model.ProcessDefinitionKey;
+import org.kie.kogito.index.model.ProcessInstance;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.h2.H2DatabaseTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+
+import jakarta.inject.Inject;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+
+@QuarkusTest
+@QuarkusTestResource(H2DatabaseTestResource.class)
+class JPAQuarkusAddonDataIndexPersistenceTest {
+
+ @Inject
+ ProcessDefinitionEntityStorage processDefinitionEntityStorage;
+
+ @Inject
+ ProcessInstanceEntityStorage processInstanceEntityStorage;
+
+ static {
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
+ }
+
+ @Test
+ void testDataIndexAddon() {
+
+ String processDefId = "hello";
+ String version = "1.0";
+
+ ProcessDefinition definition = processDefinitionEntityStorage.get(new
ProcessDefinitionKey(processDefId, version));
+
+ Assertions.assertThat(definition)
+ .isNotNull()
+ .hasFieldOrPropertyWithValue("id", processDefId)
+ .hasFieldOrPropertyWithValue("version", version)
+ .hasFieldOrPropertyWithValue("name", processDefId)
+ .hasFieldOrPropertyWithValue("type", "BPMN")
+ .hasFieldOrProperty("description")
+ .hasFieldOrProperty("source")
+ .hasFieldOrProperty("addons")
+ .hasFieldOrProperty("roles")
+ .hasFieldOrProperty("endpoint")
+ .hasFieldOrProperty("nodes");
+
+ Assertions.assertThat(definition.getSource())
+ .isNotBlank();
+
+ Assertions.assertThat(definition.getAddons())
+ .hasSize(3)
+ .contains("jdbc-persistence", "process-svg", "source-files");
+
+ Assertions.assertThat(definition.getNodes())
+ .hasSize(2);
+
+ String processInstanceId = given()
+ .contentType(ContentType.JSON)
+ .accept(ContentType.JSON)
+ .post("/hello")
+ .then()
+ .statusCode(201)
+ .body("id", is(notNullValue()))
+ .extract().path("id");
+
+ Assertions.assertThat(processInstanceId)
+ .isNotBlank();
+
+ ProcessInstance instance =
processInstanceEntityStorage.get(processInstanceId);
+
+ Assertions.assertThat(instance)
+ .isNotNull()
+ .hasFieldOrPropertyWithValue("id", processInstanceId)
+ .hasFieldOrPropertyWithValue("processId", processDefId)
+ .hasFieldOrPropertyWithValue("processName", processDefId)
+ .hasFieldOrPropertyWithValue("version", version)
+ .hasFieldOrPropertyWithValue("state", 2)
+ .hasFieldOrProperty("nodes")
+ .hasFieldOrProperty("start")
+ .hasFieldOrProperty("end")
+ .hasFieldOrProperty("lastUpdate");
+ }
+
+}
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-sw/pom.xml
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-sw/pom.xml
new file mode 100644
index 000000000..d231cf986
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-sw/pom.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-parent</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-integration-tests-sw</artifactId>
+ <name>Kogito Apps :: Kogito Addons Quarkus Data Index Persistence JPA ::
Integration Tests :: SW</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.kie.sonataflow</groupId>
+ <artifactId>sonataflow-quarkus</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy-jackson</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-persistence-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-persistence-jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-source-files</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-agroal</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jdbc-h2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-test-h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index-test-utils</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-test-utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <version>${version.io.quarkus}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>native</id>
+ <activation>
+ <property>
+ <name>native</name>
+ </property>
+ </activation>
+ <properties>
+ <quarkus.package.type>native</quarkus.package.type>
+ <failsafe.include>**/*IT.java</failsafe.include>
+ </properties>
+ </profile>
+ </profiles>
+</project>
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-sw/src/main/resources/application.properties
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-sw/src/main/resources/application.properties
new file mode 100644
index 000000000..d2d4bcade
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-sw/src/main/resources/application.properties
@@ -0,0 +1,35 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+kogito.persistence.type=jdbc
+kogito.service.url=http://localhost:8080
+
+quarkus.flyway.migrate-at-start=true
+quarkus.flyway.baseline-on-migrate=true
+
+quarkus.datasource.db-kind=h2
+quarkus.datasource.username=kogito
+quarkus.datasource.jdbc.url=jdbc:h2:mem:default;NON_KEYWORDS=VALUE,KEY
+
+quarkus.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-sw/src/main/resources/greet.sw.json
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-sw/src/main/resources/greet.sw.json
new file mode 100644
index 000000000..a849f440e
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-sw/src/main/resources/greet.sw.json
@@ -0,0 +1,71 @@
+{
+ "id": "greet",
+ "version": "1.0",
+ "name": "Greeting workflow",
+ "expressionLang": "jsonpath",
+ "description": "JSON based greeting workflow",
+ "start": "ChooseOnLanguage",
+ "functions": [
+ {
+ "name": "greetFunction",
+ "type": "custom",
+ "operation": "sysout"
+ },
+ {
+ "name": "isEnglish",
+ "type": "expression",
+ "operation" : "$.[?(@.language == 'English')]"
+ }
+ ],
+ "states": [
+ {
+ "name": "ChooseOnLanguage",
+ "type": "switch",
+ "dataConditions": [
+ {
+ "condition": "fn:isEnglish",
+ "transition": "GreetInEnglish"
+ },
+ {
+ "condition": "${ $.[?(@.language == 'Spanish')] }",
+ "transition": "GreetInSpanish"
+ }
+ ],
+ "defaultCondition": {
+ "transition": "GreetInEnglish"
+ }
+ },
+ {
+ "name": "GreetInEnglish",
+ "type": "inject",
+ "data": {
+ "greeting": "Hello from JSON Workflow,"
+ },
+ "transition": "GreetPerson"
+ },
+ {
+ "name": "GreetInSpanish",
+ "type": "inject",
+ "data": {
+ "greeting": "Saludos desde JSON Workflow,"
+ },
+ "transition": "GreetPerson"
+ },
+ {
+ "name": "GreetPerson",
+ "type": "operation",
+ "actions": [
+ {
+ "name": "greetAction",
+ "functionRef": {
+ "refName": "greetFunction",
+ "arguments": {
+ "message": "$.greeting $.name"
+ }
+ }
+ }
+ ],
+ "end": true
+ }
+ ]
+}
\ No newline at end of file
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexPersistenceTest.java
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexPersistenceTest.java
new file mode 100644
index 000000000..aa173cee8
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexPersistenceTest.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.addons.quarkus.data.index.it;
+
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.kie.kogito.index.jpa.storage.ProcessDefinitionEntityStorage;
+import org.kie.kogito.index.jpa.storage.ProcessInstanceEntityStorage;
+import org.kie.kogito.index.model.ProcessDefinition;
+import org.kie.kogito.index.model.ProcessDefinitionKey;
+import org.kie.kogito.index.model.ProcessInstance;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.h2.H2DatabaseTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+
+import jakarta.inject.Inject;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.CoreMatchers.is;
+
+@QuarkusTest
+@QuarkusTestResource(H2DatabaseTestResource.class)
+class JPAQuarkusAddonDataIndexPersistenceTest {
+
+ static {
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
+ }
+
+ @Inject
+ ProcessDefinitionEntityStorage processDefinitionEntityStorage;
+
+ @Inject
+ ProcessInstanceEntityStorage processInstanceEntityStorage;
+
+ @Test
+ void testDataIndexAddon() {
+ String processDefId = "greet";
+ String version = "1.0";
+
+ ProcessDefinition definition = processDefinitionEntityStorage.get(new
ProcessDefinitionKey(processDefId, version));
+
+ Assertions.assertThat(definition)
+ .isNotNull()
+ .hasFieldOrPropertyWithValue("id", processDefId)
+ .hasFieldOrPropertyWithValue("version", version)
+ .hasFieldOrPropertyWithValue("name", "Greeting workflow")
+ .hasFieldOrPropertyWithValue("type", "SW")
+ .hasFieldOrProperty("description")
+ .hasFieldOrProperty("source")
+ .hasFieldOrProperty("addons")
+ .hasFieldOrProperty("roles")
+ .hasFieldOrProperty("endpoint")
+ .hasFieldOrProperty("nodes");
+
+ Assertions.assertThat(definition.getSource())
+ .isNotBlank();
+
+ Assertions.assertThat(definition.getAddons())
+ .hasSize(3)
+ .contains("jdbc-persistence", "source-files", "cloudevents");
+
+ Assertions.assertThat(definition.getNodes())
+ .hasSize(12);
+
+ String processInstanceId = given()
+ .contentType(ContentType.JSON)
+ .accept(ContentType.JSON)
+ .body("{\"workflowdata\" : {\"name\" : \"John\",
\"language\":\"English\"}}").when()
+ .post("/greet")
+ .then()
+ .statusCode(201)
+ .body("workflowdata.greeting", is("Hello from JSON Workflow,"))
+ .extract().path("id");
+
+ Assertions.assertThat(processInstanceId)
+ .isNotBlank();
+
+ ProcessInstance instance =
processInstanceEntityStorage.get(processInstanceId);
+
+ Assertions.assertThat(instance)
+ .isNotNull()
+ .hasFieldOrPropertyWithValue("id", processInstanceId)
+ .hasFieldOrPropertyWithValue("processId", processDefId)
+ .hasFieldOrPropertyWithValue("processName", "Greeting
workflow")
+ .hasFieldOrPropertyWithValue("version", version)
+ .hasFieldOrPropertyWithValue("state", 2)
+ .hasFieldOrProperty("nodes")
+ .hasFieldOrProperty("start")
+ .hasFieldOrProperty("end")
+ .hasFieldOrProperty("lastUpdate");
+ }
+
+}
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/pom.xml
similarity index 60%
copy from data-index/kogito-addons-quarkus-data-index-persistence/pom.xml
copy to
data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/pom.xml
index d4cb56a63..e2efc6201 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/pom.xml
@@ -19,25 +19,28 @@
under the License.
-->
-<project 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"
- xmlns="http://maven.apache.org/POM/4.0.0">
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.kie.kogito</groupId>
- <artifactId>data-index</artifactId>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-persistence</artifactId>
<version>999-SNAPSHOT</version>
</parent>
-
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-data-index-persistence</artifactId>
- <name>Kogito Apps :: Kogito Addons Quarkus Data Index Persistence</name>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-parent</artifactId>
<packaging>pom</packaging>
+ <name>Kogito Apps :: Kogito Addons Quarkus Data Index Persistence JPA</name>
+
+ <properties>
+
<java.module.name>org.kie.kogito.index.quarkus.data.index.persistence.jpa</java.module.name>
+ </properties>
+
<modules>
- <module>kogito-addons-quarkus-data-index-persistence-common</module>
- <module>kogito-addons-quarkus-data-index-persistence-postgresql</module>
- <module>kogito-addons-quarkus-data-index-persistence-infinispan</module>
- <module>kogito-addons-quarkus-data-index-persistence-mongodb</module>
+ <module>deployment</module>
+ <module>runtime</module>
+ <module>integration-tests-process</module>
+ <module>integration-tests-sw</module>
</modules>
</project>
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/pom.xml
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/pom.xml
new file mode 100644
index 000000000..a15db8868
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-parent</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+ <artifactId>kogito-addons-quarkus-data-index-persistence-jpa</artifactId>
+ <name>Kogito Apps :: Kogito Addons Quarkus Data Index Persistence JPA ::
Runtime</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-common-runtime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-flyway</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index-storage-jpa</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-maven-plugin</artifactId>
+ <version>${version.io.quarkus}</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>extension-descriptor</goal>
+ </goals>
+ <configuration>
+
<deployment>${project.groupId}:${project.artifactId}-deployment:${project.version}</deployment>
+ <capabilities>
+ <provides>org.kie.kogito.data-index.persistence</provides>
+ </capabilities>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-processor</artifactId>
+ <version>${version.io.quarkus}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/src/main/resources/META-INF/quarkus-extension.yaml
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 000000000..9c8c26914
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,35 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+name: Kogito Data Index Persistence JPA Quarkus Add-On
+description: Add-On to colocate the Data Index Persistence (JPA) in your
application.
+metadata:
+ keywords:
+ - data-index
+ - kogito
+ - processes
+ - workflows
+ - tasks
+ - jobs
+ - BPMN
+ - JPA
+ guide: https://quarkus.io/guides/kogito
+ categories:
+ - "business-automation"
+ status: "stable"
\ No newline at end of file
diff --git
a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/src/main/resources/application.properties
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/src/main/resources/application.properties
new file mode 100644
index 000000000..472da8443
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa/runtime/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.
+#
+
+#Data Index
+kogito.apps.persistence.type=jdbc
+
+#Hibernate
+quarkus.hibernate-orm.jdbc.timezone=UTC
+quarkus.hibernate-orm.physical-naming-strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
+quarkus.flyway.locations=classpath:db/migration
+quarkus.flyway.repair-at-start=true
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml
b/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml
index d4cb56a63..23f142e14 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml
@@ -36,6 +36,7 @@
<modules>
<module>kogito-addons-quarkus-data-index-persistence-common</module>
<module>kogito-addons-quarkus-data-index-persistence-postgresql</module>
+ <module>kogito-addons-quarkus-data-index-persistence-jpa</module>
<module>kogito-addons-quarkus-data-index-persistence-infinispan</module>
<module>kogito-addons-quarkus-data-index-persistence-mongodb</module>
</modules>
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/deployment/pom.xml
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/deployment/pom.xml
new file mode 100644
index 000000000..9b04a7dcd
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/deployment/pom.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-jpa-parent</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+ <artifactId>kogito-addons-quarkus-data-index-jpa-deployment</artifactId>
+ <name>Kogito Apps :: Kogito Addons Quarkus Data Index JPA ::
Deployment</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-common-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-vertx-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-vertx-graphql-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-hibernate-orm-panache-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-reactive-routes-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5-internal</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-processor</artifactId>
+ <version>${version.io.quarkus}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/JPADataIndexProcessor.java
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/JPADataIndexProcessor.java
new file mode 100644
index 000000000..538c9d2f8
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/JPADataIndexProcessor.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.addons.quarkus.data.index.deployment;
+
+import java.util.List;
+
+import io.quarkus.deployment.IsDevelopment;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.SystemPropertyBuildItem;
+import io.quarkus.devui.spi.page.CardPageBuildItem;
+import io.quarkus.devui.spi.page.Page;
+
+public class JPADataIndexProcessor extends
AbstractKogitoAddonsQuarkusDataIndexProcessor {
+
+ private static final String FEATURE =
"kogito-addons-quarkus-data-index-jpa";
+
+ @BuildStep
+ public FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+ @BuildStep(onlyIf = { IsDevelopment.class })
+ CardPageBuildItem createDevUILink(List<SystemPropertyBuildItem>
systemPropertyBuildItems) {
+ CardPageBuildItem cardPageBuildItem = new CardPageBuildItem();
+ cardPageBuildItem.addPage(Page.externalPageBuilder("Data Index GraphQL
UI")
+ .url("/q/graphql-ui/")
+ .isHtmlContent()
+ .icon("font-awesome-solid:signs-post"));
+ return cardPageBuildItem;
+ }
+}
diff --git
a/persistence-commons/persistence-commons-jpa/src/main/resources/META-INF/beans.xml
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/deployment/src/main/resources/dev-templates/dataindex.html
similarity index 63%
copy from
persistence-commons/persistence-commons-jpa/src/main/resources/META-INF/beans.xml
copy to
data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/deployment/src/main/resources/dev-templates/dataindex.html
index a0eb9fbf8..c121df785 100644
---
a/persistence-commons/persistence-commons-jpa/src/main/resources/META-INF/beans.xml
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/deployment/src/main/resources/dev-templates/dataindex.html
@@ -18,3 +18,15 @@
under the License.
-->
+{#include main fluid=true} {#style} .main-container { margin: 0; padding: 0; }
+{/style} {#title}Data Index GraphQL UI{/title} {#body}
+<div class="row">
+ <div class="col-xs-12 col-sm-12 col-md-12">
+ <iframe
+ style="width: 100vw; height: 100vh; position: relative"
+
src="{config:property('quarkus.http.root-path')}{config:property('quarkus.http.non-application-root-path')}/graphql-ui/"
+ style="border: none"
+ ></iframe>
+ </div>
+</div>
+{/body} {/include}
diff --git
a/persistence-commons/persistence-commons-jpa/src/main/resources/META-INF/beans.xml
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/deployment/src/main/resources/dev-templates/embedded.html
similarity index 86%
copy from
persistence-commons/persistence-commons-jpa/src/main/resources/META-INF/beans.xml
copy to
data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/deployment/src/main/resources/dev-templates/embedded.html
index a0eb9fbf8..09553d5f1 100644
---
a/persistence-commons/persistence-commons-jpa/src/main/resources/META-INF/beans.xml
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/deployment/src/main/resources/dev-templates/embedded.html
@@ -18,3 +18,7 @@
under the License.
-->
+<a href="{urlbase}/dataindex" class="badge badge-light">
+ <i class="fa fa-map-signs fa-fw"></i>
+ Data Index GraphQL UI
+</a>
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/pom.xml
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/pom.xml
new file mode 100644
index 000000000..f724fcdad
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/pom.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-jpa-parent</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
<artifactId>kogito-addons-quarkus-data-index-jpa-integration-tests-process</artifactId>
+ <name>Kogito Apps :: Kogito Addons Quarkus Data Index JPA :: Integration
Tests :: Process</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-quarkus</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy-jackson</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-persistence-jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-process-svg</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-agroal</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jdbc-h2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-postgresql-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <version>${version.io.quarkus}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>native</id>
+ <activation>
+ <property>
+ <name>native</name>
+ </property>
+ </activation>
+ <properties>
+ <quarkus.package.type>native</quarkus.package.type>
+ <failsafe.include>**/*IT.java</failsafe.include>
+ </properties>
+ </profile>
+ </profiles>
+</project>
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
new file mode 100644
index 000000000..716974fb8
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
@@ -0,0 +1,71 @@
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="563" height="393" viewBox="0
0 563 393">
+ <defs/>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g>
+ <g>
+ <g>
+ <path fill="none" stroke="#d3d3d3" paint-order="fill stroke markers"
d=" M 0 0 L 1200 0" stroke-miterlimit="10" stroke-opacity="0.8"
stroke-dasharray="5"/>
+ </g>
+ <g>
+ <path fill="none" stroke="#d3d3d3" paint-order="fill stroke markers"
d=" M 0 0 L 0 800" stroke-miterlimit="10" stroke-opacity="0.8"
stroke-dasharray="5"/>
+ </g>
+ </g>
+ <g id="_C3F8BD7A-55E5-4513-8C0D-5576F8099167"
bpmn2nodeid="_C3F8BD7A-55E5-4513-8C0D-5576F8099167"
transform="matrix(1,0,0,1,321,287)">
+ <g>
+ <path fill="none" stroke="none"/>
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path fill="#e8fae6" stroke="black"
id="_C3F8BD7A-55E5-4513-8C0D-5576F8099167?shapeType=BACKGROUND"
paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C
394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444
C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5
334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4
184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001
80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8
13.8 334.5 33.6 C 368.2 53.400000000000 [...]
+ stroke-miterlimit="10" stroke-dasharray=""/>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path fill="rgb(74,162,65)" stroke="black"
id="_C3F8BD7A-55E5-4513-8C0D-5576F8099167?shapeType=BORDER&renderType=FILL"
paint-order="fill stroke markers"
+ d=" M 0 0 M 224 0 C 100.3 0 0 100.3 0 224 C 0 347.7
100.3 448 224 448 C 347.7 448 448 347.7 448 224 C 448 100.30000000000001 347.7
0 224 0 Z M 0 0 M 224 432 C 109.1 432 16 338.9 16 224 C 16 109.10000000000002
109.1 16 224 16 C 338.9 16 432 109.1 432 224 C 432 338.9 338.9 432 224 432 Z"
+ stroke-miterlimit="10" stroke-dasharray=""/>
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)"/>
+ </g>
+ <g transform="matrix(1,0,0,1,321,287)"/>
+ <g id="_B3241ACF-97BE-443B-A49F-964AB3DD006C"
bpmn2nodeid="_B3241ACF-97BE-443B-A49F-964AB3DD006C"
transform="matrix(1,0,0,1,457,287)">
+ <g>
+ <path fill="none" stroke="none"/>
+ </g>
+ <g transform="matrix(0.125,0,0,0.125,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path fill="#fce7e7" stroke="black"
id="_B3241ACF-97BE-443B-A49F-964AB3DD006C?shapeType=BACKGROUND"
paint-order="fill stroke markers"
+ d=" M 0 0 M 444 224 C 444 263.9 434.2 300.8 414.4 334.5 C
394.7 368.2 368 394.9 334.4 414.5 C 300.79999999999995 434.1 263.9 444 224 444
C 184.10000000000002 444 147.2 434.2 113.5 414.4 C 79.8 394.7 53.1 368 33.5
334.4 C 13.899999999999999 300.79999999999995 4 263.9 4 224 C 4
184.10000000000002 13.8 147.2 33.6 113.5 C 53.400000000000006 79.80000000000001
80.1 53.1 113.6 33.5 C 147.1 13.899999999999999 184.1 4 224 4 C 263.9 4 300.8
13.8 334.5 33.6 C 368.2 53.400000000000 [...]
+ stroke-miterlimit="10" stroke-dasharray=""/>
+ </g>
+ <g>
+ <g transform="matrix(1,0,0,1,0,0)">
+ <g transform="matrix(1,0,0,1,0,0)">
+ <path fill="rgb(0,136,206)" stroke="black"
id="_B3241ACF-97BE-443B-A49F-964AB3DD006C?shapeType=BORDER&renderType=FILL"
paint-order="fill stroke markers"
+ d=" M 0 0 M 224 0 C 100.3 0 0 100.3 0 224 C 0 347.7
100.3 448 224 448 C 347.7 448 448 347.7 448 224 C 448 100.30000000000001 347.7
0 224 0 Z M 0 0 M 224 400 C 126.8 400 48 321.2 48 224 C 48 126.80000000000001
126.8 48 224 48 C 321.2 48 400 126.8 400 224 C 400 321.2 321.2 400 224 400 Z"
+ stroke-miterlimit="10" stroke-dasharray=""/>
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,28,61)"/>
+ </g>
+ <g transform="matrix(1,0,0,1,457,287)"/>
+ <g id="_9FD38FF8-A530-41E7-8EA0-E1F71353CBB3"
bpmn2nodeid="_9FD38FF8-A530-41E7-8EA0-E1F71353CBB3">
+ <g>
+ <path fill="none" stroke="#000000" paint-order="fill stroke markers"
d=" M 377 315 L 442 315" stroke-miterlimit="10" stroke-dasharray=""/>
+ </g>
+ <g transform="matrix(1,0,0,1,377,315)"/>
+ <g
transform="matrix(6.123233995736766e-17,1,-1,6.123233995736766e-17,457,310)">
+ <path fill="#000000" stroke="#000000" paint-order="fill stroke
markers" d=" M 10 15 L 0 15 L 5 0 Z" stroke-miterlimit="10"
stroke-dasharray=""/>
+ </g>
+ <g transform="matrix(1,0,0,1,377,305)"/>
+ </g>
+ </g>
+ </g>
+</svg>
\ No newline at end of file
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/application.properties
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/application.properties
new file mode 100644
index 000000000..2e5b20da6
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/application.properties
@@ -0,0 +1,35 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+kogito.persistence.type=jdbc
+quarkus.flyway.migrate-at-start=true
+
+quarkus.kogito.data-index.graphql.ui.always-include=true
+
+quarkus.datasource.db-kind=h2
+quarkus.datasource.username=kogito
+quarkus.datasource.jdbc.url=jdbc:h2:mem:default;NON_KEYWORDS=VALUE,KEY
+
+# Not using Keycloak Dev service in test
+quarkus.keycloak.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/hello.bpmn
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/hello.bpmn
new file mode 100644
index 000000000..939c411bb
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/main/resources/hello.bpmn
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions 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" xmlns:xsi="xsi"
id="_hT2oIPJzEDuE8tm0q8uK_w"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www.jboss.org/drools drools.xsd http://www [...]
+ <bpmn2:collaboration id="_4326C578-FDBD-4F8C-BAB8-5C9CFE867882"
name="Default Collaboration">
+ <bpmn2:participant id="_B70F49F9-D9BE-4BCD-A095-2601433AD6F7" name="Pool
Participant" processRef="hello"/>
+ </bpmn2:collaboration>
+ <bpmn2:process id="hello" drools:packageName="com.example"
drools:version="1.0" drools:adHoc="false" name="hello" isExecutable="true"
processType="Public">
+ <bpmn2:sequenceFlow id="_9FD38FF8-A530-41E7-8EA0-E1F71353CBB3"
sourceRef="_C3F8BD7A-55E5-4513-8C0D-5576F8099167"
targetRef="_B3241ACF-97BE-443B-A49F-964AB3DD006C"/>
+ <bpmn2:endEvent id="_B3241ACF-97BE-443B-A49F-964AB3DD006C">
+ <bpmn2:incoming>_9FD38FF8-A530-41E7-8EA0-E1F71353CBB3</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:startEvent id="_C3F8BD7A-55E5-4513-8C0D-5576F8099167">
+ <bpmn2:outgoing>_9FD38FF8-A530-41E7-8EA0-E1F71353CBB3</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="hello">
+ <bpmndi:BPMNShape id="shape__C3F8BD7A-55E5-4513-8C0D-5576F8099167"
bpmnElement="_C3F8BD7A-55E5-4513-8C0D-5576F8099167">
+ <dc:Bounds height="56" width="56" x="321" y="287"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__B3241ACF-97BE-443B-A49F-964AB3DD006C"
bpmnElement="_B3241ACF-97BE-443B-A49F-964AB3DD006C">
+ <dc:Bounds height="56" width="56" x="457" y="287"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge
id="edge_shape__C3F8BD7A-55E5-4513-8C0D-5576F8099167_to_shape__B3241ACF-97BE-443B-A49F-964AB3DD006C"
bpmnElement="_9FD38FF8-A530-41E7-8EA0-E1F71353CBB3">
+ <di:waypoint x="349" y="315"/>
+ <di:waypoint x="485" y="315"/>
+ </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="_C3F8BD7A-55E5-4513-8C0D-5576F8099167">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ </bpsim:ElementParameters>
+ </bpsim:Scenario>
+ </bpsim:BPSimData>
+ </bpmn2:extensionElements>
+ <bpmn2:source>_hT2oIPJzEDuE8tm0q8uK_w</bpmn2:source>
+ <bpmn2:target>_hT2oIPJzEDuE8tm0q8uK_w</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
\ No newline at end of file
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexIT.java
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexIT.java
new file mode 100644
index 000000000..c281a08e3
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexIT.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.addons.quarkus.data.index.it;
+
+import org.junit.jupiter.api.Test;
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.Matchers.greaterThanOrEqualTo;
+
+@QuarkusIntegrationTest
+class JPAQuarkusAddonDataIndexIT {
+
+ static {
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
+ }
+
+ @Test
+ void testDataIndexAddon() {
+ String processDefId = "hello";
+ given().contentType(ContentType.JSON).body("{ \"query\" :
\"{ProcessDefinitions(where: { id: {equal: \\\"" + processDefId +
+ "\\\"}}){ id, version, name } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessDefinitions.size()", is(1))
+ .body("data.ProcessDefinitions[0].id", is("hello"))
+ .body("data.ProcessDefinitions[0].version", is("1.0"))
+ .body("data.ProcessDefinitions[0].name", is("hello"));
+
+ given().contentType(ContentType.JSON).body("{ \"query\" :
\"{ProcessInstances{ id } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessInstances.size()",
is(greaterThanOrEqualTo(0)));
+
+ String processInstanceId = given()
+ .contentType(ContentType.JSON)
+ .accept(ContentType.JSON)
+ .post("/hello")
+ .then()
+ .statusCode(201)
+ .body("id", is(notNullValue()))
+ .extract().path("id");
+
+ given().contentType(ContentType.JSON)
+ .body("{ \"query\" : \"{ProcessInstances(where: { id: {equal:
\\\"" + processInstanceId + "\\\"}}){ id, state, diagram, source,
nodeDefinitions { name } } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessInstances.size()", is(1))
+ .body("data.ProcessInstances[0].id", is(processInstanceId))
+ .body("data.ProcessInstances[0].state", is("COMPLETED"))
+ .body("data.ProcessInstances[0].diagram", is(notNullValue()))
+ .body("data.ProcessInstances[0].source", is(notNullValue()))
+ .body("data.ProcessInstances[0].nodeDefinitions.size()",
is(2));
+ }
+
+ @Test
+ void testGraphQLUI() {
+ given().contentType(ContentType.HTML)
+ .when().get("/q/graphql-ui/")
+ .then().statusCode(200)
+ .body("html.head.title", is("GraphiQL"));
+ }
+
+}
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-sw/pom.xml
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-sw/pom.xml
new file mode 100644
index 000000000..990859cdf
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-sw/pom.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-jpa-parent</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
<artifactId>kogito-addons-quarkus-data-index-jpa-integration-tests-sw</artifactId>
+ <name>Kogito Apps :: Kogito Addons Quarkus Data Index JPA :: Integration
Tests :: SW</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.kie.sonataflow</groupId>
+ <artifactId>sonataflow-quarkus</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy-jackson</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-quarkus-persistence-jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-agroal</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jdbc-h2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-jpa-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <version>${version.io.quarkus}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>native</id>
+ <activation>
+ <property>
+ <name>native</name>
+ </property>
+ </activation>
+ <properties>
+ <quarkus.package.type>native</quarkus.package.type>
+ <failsafe.include>**/*IT.java</failsafe.include>
+ </properties>
+ </profile>
+ </profiles>
+</project>
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-sw/src/main/resources/application.properties
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-sw/src/main/resources/application.properties
new file mode 100644
index 000000000..2e5b20da6
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-sw/src/main/resources/application.properties
@@ -0,0 +1,35 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+kogito.persistence.type=jdbc
+quarkus.flyway.migrate-at-start=true
+
+quarkus.kogito.data-index.graphql.ui.always-include=true
+
+quarkus.datasource.db-kind=h2
+quarkus.datasource.username=kogito
+quarkus.datasource.jdbc.url=jdbc:h2:mem:default;NON_KEYWORDS=VALUE,KEY
+
+# Not using Keycloak Dev service in test
+quarkus.keycloak.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-sw/src/main/resources/greet.sw.json
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-sw/src/main/resources/greet.sw.json
new file mode 100644
index 000000000..a849f440e
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-sw/src/main/resources/greet.sw.json
@@ -0,0 +1,71 @@
+{
+ "id": "greet",
+ "version": "1.0",
+ "name": "Greeting workflow",
+ "expressionLang": "jsonpath",
+ "description": "JSON based greeting workflow",
+ "start": "ChooseOnLanguage",
+ "functions": [
+ {
+ "name": "greetFunction",
+ "type": "custom",
+ "operation": "sysout"
+ },
+ {
+ "name": "isEnglish",
+ "type": "expression",
+ "operation" : "$.[?(@.language == 'English')]"
+ }
+ ],
+ "states": [
+ {
+ "name": "ChooseOnLanguage",
+ "type": "switch",
+ "dataConditions": [
+ {
+ "condition": "fn:isEnglish",
+ "transition": "GreetInEnglish"
+ },
+ {
+ "condition": "${ $.[?(@.language == 'Spanish')] }",
+ "transition": "GreetInSpanish"
+ }
+ ],
+ "defaultCondition": {
+ "transition": "GreetInEnglish"
+ }
+ },
+ {
+ "name": "GreetInEnglish",
+ "type": "inject",
+ "data": {
+ "greeting": "Hello from JSON Workflow,"
+ },
+ "transition": "GreetPerson"
+ },
+ {
+ "name": "GreetInSpanish",
+ "type": "inject",
+ "data": {
+ "greeting": "Saludos desde JSON Workflow,"
+ },
+ "transition": "GreetPerson"
+ },
+ {
+ "name": "GreetPerson",
+ "type": "operation",
+ "actions": [
+ {
+ "name": "greetAction",
+ "functionRef": {
+ "refName": "greetFunction",
+ "arguments": {
+ "message": "$.greeting $.name"
+ }
+ }
+ }
+ ],
+ "end": true
+ }
+ ]
+}
\ No newline at end of file
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexIT.java
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexIT.java
new file mode 100644
index 000000000..fcf179910
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/JPAQuarkusAddonDataIndexIT.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.addons.quarkus.data.index.it;
+
+import org.junit.jupiter.api.Test;
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.Matchers.greaterThanOrEqualTo;
+
+@QuarkusIntegrationTest
+class JPAQuarkusAddonDataIndexIT {
+
+ static {
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
+ }
+
+ @Test
+ void testDataIndexAddon() {
+ String processDefId = "greet";
+ given().contentType(ContentType.JSON).body("{ \"query\" :
\"{ProcessDefinitions(where: { id: {equal: \\\"" + processDefId +
+ "\\\"}}){ id, version, name } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessDefinitions.size()", is(1))
+ .body("data.ProcessDefinitions[0].id", is("greet"))
+ .body("data.ProcessDefinitions[0].version", is("1.0"))
+ .body("data.ProcessDefinitions[0].name", is("Greeting
workflow"));
+
+ given().contentType(ContentType.JSON).body("{ \"query\" :
\"{ProcessInstances{ id } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessInstances.size()",
is(greaterThanOrEqualTo(0)));
+
+ String processInstanceId = given()
+ .contentType(ContentType.JSON)
+ .accept(ContentType.JSON)
+ .body("{\"workflowdata\" : {\"name\" : \"John\",
\"language\":\"English\"}}").when()
+ .post("/greet")
+ .then()
+ .statusCode(201)
+ .body("workflowdata.greeting", is("Hello from JSON Workflow,"))
+ .extract().path("id");
+
+ given().contentType(ContentType.JSON)
+ .body("{ \"query\" : \"{ProcessInstances(where: { id: {equal:
\\\"" + processInstanceId + "\\\"}}){ id, state, diagram, source,
nodeDefinitions { name } } }\" }")
+ .when().post("/graphql")
+ .then().statusCode(200)
+ .body("data.ProcessInstances.size()", is(1))
+ .body("data.ProcessInstances[0].id", is(processInstanceId))
+ .body("data.ProcessInstances[0].state", is("COMPLETED"))
+ .body("data.ProcessInstances[0].diagram", is(nullValue()))
+ .body("data.ProcessInstances[0].source", is(notNullValue()))
+ .body("data.ProcessInstances[0].nodeDefinitions.size()",
is(12));
+ }
+
+ @Test
+ void testGraphQLUI() {
+ given().contentType(ContentType.HTML)
+ .when().get("/q/graphql-ui/")
+ .then().statusCode(200)
+ .body("html.head.title", is("GraphiQL"));
+ }
+
+}
diff --git a/data-index/kogito-addons-quarkus-data-index/pom.xml
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/pom.xml
similarity index 57%
copy from data-index/kogito-addons-quarkus-data-index/pom.xml
copy to
data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/pom.xml
index 2996e9027..aa7cd8598 100644
--- a/data-index/kogito-addons-quarkus-data-index/pom.xml
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/pom.xml
@@ -19,26 +19,28 @@
under the License.
-->
-<project 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"
- xmlns="http://maven.apache.org/POM/4.0.0">
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.kie.kogito</groupId>
- <artifactId>data-index</artifactId>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index</artifactId>
<version>999-SNAPSHOT</version>
</parent>
-
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-data-index</artifactId>
- <name>Kogito Apps :: Kogito Addons Quarkus Data Index</name>
+ <artifactId>kogito-addons-quarkus-data-index-jpa-parent</artifactId>
<packaging>pom</packaging>
+ <name>Kogito Apps :: Kogito Addons Quarkus Data Index JPA</name>
+
+ <properties>
+
<java.module.name>org.kie.kogito.addons.quarkus.data.index.jpa</java.module.name>
+ </properties>
+
<modules>
- <module>kogito-addons-quarkus-data-index-common</module>
- <module>kogito-addons-quarkus-data-index-inmemory</module>
- <module>kogito-addons-quarkus-data-index-postgresql</module>
- <module>kogito-addons-quarkus-data-index-infinispan</module>
- <module>kogito-addons-quarkus-data-index-mongodb</module>
+ <module>deployment</module>
+ <module>runtime</module>
+ <module>integration-tests-sw</module>
+ <module>integration-tests-process</module>
</modules>
</project>
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/runtime/pom.xml
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/runtime/pom.xml
new file mode 100644
index 000000000..5a9e0e228
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/runtime/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-jpa-parent</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+ <artifactId>kogito-addons-quarkus-data-index-jpa</artifactId>
+ <name>Kogito Apps :: Kogito Addons Quarkus Data Index JPA :: Runtime</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-common-runtime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-persistence-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-vertx-graphql</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-maven-plugin</artifactId>
+ <version>${version.io.quarkus}</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>extension-descriptor</goal>
+ </goals>
+ <configuration>
+
<deployment>${project.groupId}:${project.artifactId}-deployment:${project.version}</deployment>
+ <capabilities>
+ <provides>org.kie.kogito.data-index</provides>
+ </capabilities>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-processor</artifactId>
+ <version>${version.io.quarkus}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/runtime/src/main/resources/META-INF/quarkus-extension.yaml
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 000000000..4086152b7
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+name: Kogito Data Index PostgreSQL Quarkus Add-On
+description: Runs the Kogito Data Index embedded with JPA persistence
+metadata:
+ keywords:
+ - data-index
+ - kogito
+ - processes
+ - workflows
+ - tasks
+ - jobs
+ - BPMN
+ - postgresql
+ guide: https://quarkus.io/guides/kogito
+ categories:
+ - "business-automation"
+ status: "stable"
+ config:
+ - "kogito.data-index."
+ - "kogito.dataindex."
\ No newline at end of file
diff --git
a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/runtime/src/main/resources/application.properties
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/runtime/src/main/resources/application.properties
new file mode 100644
index 000000000..648cbe8fc
--- /dev/null
+++
b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-jpa/runtime/src/main/resources/application.properties
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#Data Index
+kogito.apps.persistence.type=jdbc
+kogito.data-index.domain-indexing=false
+kogito.data-index.blocking=true
+
+#Hibernate
+quarkus.hibernate-orm.jdbc.timezone=UTC
+quarkus.hibernate-orm.physical-naming-strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
+quarkus.flyway.locations=classpath:db/migration
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index/pom.xml
b/data-index/kogito-addons-quarkus-data-index/pom.xml
index 2996e9027..e7aacaefb 100644
--- a/data-index/kogito-addons-quarkus-data-index/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/pom.xml
@@ -39,6 +39,7 @@
<module>kogito-addons-quarkus-data-index-postgresql</module>
<module>kogito-addons-quarkus-data-index-infinispan</module>
<module>kogito-addons-quarkus-data-index-mongodb</module>
+ <module>kogito-addons-quarkus-data-index-jpa</module>
</modules>
</project>
diff --git a/kogito-apps-bom/pom.xml b/kogito-apps-bom/pom.xml
index 90fce247c..5e903d497 100644
--- a/kogito-apps-bom/pom.xml
+++ b/kogito-apps-bom/pom.xml
@@ -444,6 +444,28 @@
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-deployment</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-persistence-jpa-deployment</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kogito-addons-quarkus-data-index-common-runtime</artifactId>
@@ -466,7 +488,28 @@
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
-
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-jpa</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-quarkus-data-index-jpa</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-jpa-deployment</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-quarkus-data-index-jpa-deployment</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
<!-- Kogito Apps Persistence -->
<dependency>
@@ -576,6 +619,17 @@
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>persistence-commons-jpa-base</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>persistence-commons-jpa-base</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>persistence-commons-jpa</artifactId>
diff --git a/persistence-commons/persistence-commons-jpa/pom.xml
b/persistence-commons/persistence-commons-jpa-base/pom.xml
similarity index 93%
copy from persistence-commons/persistence-commons-jpa/pom.xml
copy to persistence-commons/persistence-commons-jpa-base/pom.xml
index d40f23b99..3b2e9c275 100644
--- a/persistence-commons/persistence-commons-jpa/pom.xml
+++ b/persistence-commons/persistence-commons-jpa-base/pom.xml
@@ -29,11 +29,11 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>persistence-commons-jpa</artifactId>
- <name>Kogito Apps :: Persistence Commons JPA</name>
+ <artifactId>persistence-commons-jpa-base</artifactId>
+ <name>Kogito Apps :: Persistence Commons JPA - Base</name>
<properties>
- <java.module.name>org.kie.kogito.persistence.jpa</java.module.name>
+ <java.module.name>org.kie.kogito.persistence.jpa.base</java.module.name>
</properties>
<dependencies>
diff --git
a/persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/Constants.java
b/persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/Constants.java
similarity index 100%
rename from
persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/Constants.java
rename to
persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/Constants.java
diff --git
a/persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/PostgresQuery.java
b/persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/PostgresQuery.java
similarity index 100%
rename from
persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/PostgresQuery.java
rename to
persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/PostgresQuery.java
diff --git
a/persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/PostgresStorage.java
b/persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/PostgresStorage.java
similarity index 100%
rename from
persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/PostgresStorage.java
rename to
persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/PostgresStorage.java
diff --git
a/persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/PostgresStorageService.java
b/persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/PostgresStorageService.java
similarity index 100%
rename from
persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/PostgresStorageService.java
rename to
persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/PostgresStorageService.java
diff --git
a/persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/hibernate/JsonBinaryConverter.java
b/persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/hibernate/JsonBinaryConverter.java
similarity index 100%
rename from
persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/hibernate/JsonBinaryConverter.java
rename to
persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/hibernate/JsonBinaryConverter.java
diff --git
a/persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/hibernate/JsonBinaryType.java
b/persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/hibernate/JsonBinaryType.java
similarity index 100%
rename from
persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/hibernate/JsonBinaryType.java
rename to
persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/hibernate/JsonBinaryType.java
diff --git
a/persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/model/CacheEntity.java
b/persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/model/CacheEntity.java
similarity index 100%
rename from
persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/model/CacheEntity.java
rename to
persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/model/CacheEntity.java
diff --git
a/persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/model/CacheEntityRepository.java
b/persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/model/CacheEntityRepository.java
similarity index 100%
rename from
persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/model/CacheEntityRepository.java
rename to
persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/model/CacheEntityRepository.java
diff --git
a/persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/model/CacheId.java
b/persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/model/CacheId.java
similarity index 100%
rename from
persistence-commons/persistence-commons-jpa/src/main/java/org/kie/kogito/persistence/postgresql/model/CacheId.java
rename to
persistence-commons/persistence-commons-jpa-base/src/main/java/org/kie/kogito/persistence/postgresql/model/CacheId.java
diff --git
a/persistence-commons/persistence-commons-jpa/src/main/resources/META-INF/beans.xml
b/persistence-commons/persistence-commons-jpa-base/src/main/resources/META-INF/beans.xml
similarity index 100%
rename from
persistence-commons/persistence-commons-jpa/src/main/resources/META-INF/beans.xml
rename to
persistence-commons/persistence-commons-jpa-base/src/main/resources/META-INF/beans.xml
diff --git a/persistence-commons/persistence-commons-jpa/pom.xml
b/persistence-commons/persistence-commons-jpa/pom.xml
index d40f23b99..929f67277 100644
--- a/persistence-commons/persistence-commons-jpa/pom.xml
+++ b/persistence-commons/persistence-commons-jpa/pom.xml
@@ -39,38 +39,7 @@
<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
- <artifactId>persistence-commons-api</artifactId>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-hibernate-orm-panache</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hibernate.orm</groupId>
- <artifactId>hibernate-ant</artifactId>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-jackson</artifactId>
- </dependency>
- <dependency>
- <groupId>org.kie.kogito</groupId>
- <artifactId>kogito-jackson-utils</artifactId>
- </dependency>
- <dependency>
- <groupId>org.kie.kogito</groupId>
- <artifactId>kogito-quarkus-test-utils</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-junit5-mockito</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
+ <artifactId>persistence-commons-jpa-base</artifactId>
</dependency>
</dependencies>
<build>
diff --git
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.3__increase_varchar_length.sql
b/persistence-commons/persistence-commons-jpa/src/main/resources/db/migration/V1.5.0__kogito_apps_create_kogito_data_cache.sql
similarity index 82%
copy from
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.3__increase_varchar_length.sql
copy to
persistence-commons/persistence-commons-jpa/src/main/resources/db/migration/V1.5.0__kogito_apps_create_kogito_data_cache.sql
index da08414b0..3b6a41389 100644
---
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.3__increase_varchar_length.sql
+++
b/persistence-commons/persistence-commons-jpa/src/main/resources/db/migration/V1.5.0__kogito_apps_create_kogito_data_cache.sql
@@ -17,4 +17,9 @@
* under the License.
*/
-alter table processes alter column message character varying(4000)
+create table if not exists kogito_data_cache (
+ key varchar(255) not null,
+ name varchar(255) not null,
+ json_value varbinary(max),
+ primary key (key, name)
+);
\ No newline at end of file
diff --git a/persistence-commons/persistence-commons-postgresql/pom.xml
b/persistence-commons/persistence-commons-postgresql/pom.xml
index 181b102f7..fbfbf2a0f 100644
--- a/persistence-commons/persistence-commons-postgresql/pom.xml
+++ b/persistence-commons/persistence-commons-postgresql/pom.xml
@@ -39,7 +39,7 @@
<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
- <artifactId>persistence-commons-jpa</artifactId>
+ <artifactId>persistence-commons-jpa-base</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
diff --git
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.3__increase_varchar_length.sql
b/persistence-commons/persistence-commons-postgresql/src/main/resources/db/migration/V1.5.0__kogito_apps_create_kogito_data_cache.sql
similarity index 83%
rename from
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.3__increase_varchar_length.sql
rename to
persistence-commons/persistence-commons-postgresql/src/main/resources/db/migration/V1.5.0__kogito_apps_create_kogito_data_cache.sql
index da08414b0..c8167cd40 100644
---
a/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/migration/V1.45.0.3__increase_varchar_length.sql
+++
b/persistence-commons/persistence-commons-postgresql/src/main/resources/db/migration/V1.5.0__kogito_apps_create_kogito_data_cache.sql
@@ -17,4 +17,10 @@
* under the License.
*/
-alter table processes alter column message character varying(4000)
+
+create table if not exists kogito_data_cache (
+ key varchar(255) not null,
+ name varchar(255) not null,
+ json_value jsonb,
+ primary key (key, name)
+);
diff --git a/persistence-commons/pom.xml b/persistence-commons/pom.xml
index 9c7fb6451..83a58f41e 100644
--- a/persistence-commons/pom.xml
+++ b/persistence-commons/pom.xml
@@ -37,6 +37,7 @@
<modules>
<module>persistence-commons-api</module>
<module>persistence-commons-protobuf</module>
+ <module>persistence-commons-jpa-base</module>
<module>persistence-commons-jpa</module>
<module>persistence-commons-postgresql</module>
<module>persistence-commons-infinispan</module>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]