This is an automated email from the ASF dual-hosted git repository.
egonzalez 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 477655d0d [kie-issues#2039]: [Data Index Spring-Boot]: create new Data
Inde Add-On for Spring Boot (JPA) (#2244)
477655d0d is described below
commit 477655d0d03a9101087ff46d0f4e450a7bb02de1
Author: Pere Fernández <[email protected]>
AuthorDate: Mon Jul 28 12:15:14 2025 +0200
[kie-issues#2039]: [Data Index Spring-Boot]: create new Data Inde Add-On
for Spring Boot (JPA) (#2244)
* kie-issues#2039: [Data Index Spring-Boot]: create new Data Inde Add-On
for Spring Boot (JPA)
- initial commit
* - fix
* - fix
* - Wiring Data Index Schema with Spring-Boot Graphql
* - fix mvn
* - fix schemas
* - unnecessary cast
* - graphiql fix
---
.../pom.xml | 4 +-
.../index/addon/api/KogitoAddonRuntimeClient.java | 0
.../index/addon/event/DataIndexEventPublisher.java | 0
.../src/main/resources/META-INF/beans.xml | 0
data-index/{ => data-index-graphql-addons}/pom.xml | 44 +++--
.../graphql/GraphQLAddonSchemaManagerImpl.java | 17 +-
.../src/main/resources/META-INF/beans.xml | 19 ++
.../graphql/AbstractGraphQLSchemaManager.java | 14 +-
.../index/graphql/GraphQLInstrumentation.java | 6 +-
.../resources/{ => graphql}/basic.schema.graphqls | 0
.../resources/{ => graphql}/count.schema.graphqls | 0
.../resources/{ => graphql}/json.schema.graphqls | 0
.../data-index-graphql-quarkus/pom.xml | 10 ++
.../kie/kogito/index/graphql/GraphQLProducer.java | 0
.../runtime/pom.xml | 2 +-
...tractKogitoAddonsQuarkusDataIndexProcessor.java | 2 +-
.../runtime/pom.xml | 4 +
.../service/graphql/GraphQLSchemaManagerImpl.java | 21 ++-
.../pom.xml | 6 +-
.../addon/DataIndexAddonBeansProducer.java | 0
.../data-index-graphql-addons-springboot/pom.xml | 67 +++++++
.../addon/env/DataIndexURLConfiguration.java | 71 ++++++++
.../addon/graphiql/GraphiQlConfiguration.java | 49 ++++++
.../addon/graphql/DataIndexGraphqlProducer.java | 66 +++++++
.../main/resources/data-index/graphiql/index.html | 110 ++++++++++++
...exJPAStorageSpringBootSharedConfiguration.java} | 28 +--
...cation.properties => data-index-jpa.properties} | 0
.../pom.xml | 4 +-
.../pom.xml | 2 -
.../integration-tests-process/pom.xml | 195 +++++++++++++++++++++
.../kie/kogito/KogitoSpringBootApplication.java} | 25 +--
.../main/resources/META-INF/processSVG/hello.svg | 71 ++++++++
.../src/main/resources/application.properties | 11 +-
.../src/main/resources/hello.bpmn | 47 +++++
.../addon/it/JPASpringBootAddonDataIndexTest.java | 107 +++++++++++
.../pom.xml | 46 +++++
.../pom.xml | 38 ++++
.../kogito-addons-springboot-data-index/pom.xml | 38 ++++
data-index/data-index-springboot/pom.xml | 4 +-
data-index/pom.xml | 3 +-
.../embedded/stream/EventPublisherJobStreams.java | 2 +-
kogito-apps-bom/pom.xml | 42 ++++-
42 files changed, 1082 insertions(+), 93 deletions(-)
diff --git a/data-index/data-index-addons-common/pom.xml
b/data-index/data-index-common-addons/pom.xml
similarity index 96%
rename from data-index/data-index-addons-common/pom.xml
rename to data-index/data-index-common-addons/pom.xml
index 9fb22e6dc..d051529c8 100644
--- a/data-index/data-index-addons-common/pom.xml
+++ b/data-index/data-index-common-addons/pom.xml
@@ -27,8 +27,8 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>data-index-addons-common</artifactId>
- <name>Kogito Apps :: Data Index Add-Ons Common</name>
+ <artifactId>data-index-common-addons</artifactId>
+ <name>Kogito Apps :: Kogito Data Index Add-Ons Common</name>
<properties>
<java.module.name>org.kie.kogito.index.addons.common</java.module.name>
diff --git
a/data-index/data-index-addons-common/src/main/java/org/kie/kogito/index/addon/api/KogitoAddonRuntimeClient.java
b/data-index/data-index-common-addons/src/main/java/org/kie/kogito/index/addon/api/KogitoAddonRuntimeClient.java
similarity index 100%
rename from
data-index/data-index-addons-common/src/main/java/org/kie/kogito/index/addon/api/KogitoAddonRuntimeClient.java
rename to
data-index/data-index-common-addons/src/main/java/org/kie/kogito/index/addon/api/KogitoAddonRuntimeClient.java
diff --git
a/data-index/data-index-addons-common/src/main/java/org/kie/kogito/index/addon/event/DataIndexEventPublisher.java
b/data-index/data-index-common-addons/src/main/java/org/kie/kogito/index/addon/event/DataIndexEventPublisher.java
similarity index 100%
rename from
data-index/data-index-addons-common/src/main/java/org/kie/kogito/index/addon/event/DataIndexEventPublisher.java
rename to
data-index/data-index-common-addons/src/main/java/org/kie/kogito/index/addon/event/DataIndexEventPublisher.java
diff --git
a/data-index/data-index-addons-common/src/main/resources/META-INF/beans.xml
b/data-index/data-index-common-addons/src/main/resources/META-INF/beans.xml
similarity index 100%
rename from
data-index/data-index-addons-common/src/main/resources/META-INF/beans.xml
rename to
data-index/data-index-common-addons/src/main/resources/META-INF/beans.xml
diff --git a/data-index/pom.xml b/data-index/data-index-graphql-addons/pom.xml
similarity index 52%
copy from data-index/pom.xml
copy to data-index/data-index-graphql-addons/pom.xml
index 6e05b97cf..21c8fd0ef 100644
--- a/data-index/pom.xml
+++ b/data-index/data-index-graphql-addons/pom.xml
@@ -19,31 +19,27 @@
under the License.
-->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://maven.apache.org/POM/4.0.0"
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.kie.kogito</groupId>
- <artifactId>kogito-apps-build-parent</artifactId>
- <version>999-SNAPSHOT</version>
- <relativePath>../kogito-apps-build-parent/pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>data-index</artifactId>
+ <groupId>org.kie.kogito</groupId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
- <artifactId>data-index</artifactId>
- <packaging>pom</packaging>
- <name>Kogito Apps :: Data Index</name>
+ <artifactId>data-index-graphql-addons</artifactId>
+ <name>Kogito Apps :: Data Index Add-ons GraphQL</name>
- <modules>
- <module>data-index-storage</module>
- <module>data-index-common</module>
- <module>data-index-test-utils</module>
- <module>data-index-graphql</module>
- <module>data-index-service</module>
- <module>data-index-mutations</module>
- <module>data-index-addons-common</module>
- <module>data-index-quarkus</module>
- <module>data-index-springboot</module>
- </modules>
+ <properties>
+
<java.module.name>org.kie.kogito.index.addons.graphql</java.module.name>
+ </properties>
-</project>
+ <dependencies>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index-graphql</artifactId>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
diff --git
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/graphql/GraphQLAddonSchemaManagerImpl.java
b/data-index/data-index-graphql-addons/src/main/java/org/kie/kogito/index/addon/graphql/GraphQLAddonSchemaManagerImpl.java
similarity index 89%
rename from
data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/graphql/GraphQLAddonSchemaManagerImpl.java
rename to
data-index/data-index-graphql-addons/src/main/java/org/kie/kogito/index/addon/graphql/GraphQLAddonSchemaManagerImpl.java
index f6f10fdfe..63c694a66 100644
---
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/graphql/GraphQLAddonSchemaManagerImpl.java
+++
b/data-index/data-index-graphql-addons/src/main/java/org/kie/kogito/index/addon/graphql/GraphQLAddonSchemaManagerImpl.java
@@ -18,22 +18,37 @@
*/
package org.kie.kogito.index.addon.graphql;
+import org.kie.kogito.index.api.KogitoRuntimeClient;
import org.kie.kogito.index.graphql.AbstractGraphQLSchemaManager;
import org.kie.kogito.index.model.ProcessInstanceState;
+import org.kie.kogito.index.storage.DataIndexStorageService;
import graphql.scalars.ExtendedScalars;
+import graphql.schema.GraphQLScalarType;
import graphql.schema.GraphQLSchema;
import graphql.schema.idl.RuntimeWiring;
import graphql.schema.idl.SchemaGenerator;
import graphql.schema.idl.TypeDefinitionRegistry;
import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
@ApplicationScoped
public class GraphQLAddonSchemaManagerImpl extends
AbstractGraphQLSchemaManager {
+ GraphQLAddonSchemaManagerImpl() {
+ this(null, null, null);
+ // CDI
+ }
+
+ @Inject
+ public GraphQLAddonSchemaManagerImpl(DataIndexStorageService cacheService,
GraphQLScalarType dateTimeScalarType,
+ KogitoRuntimeClient dataIndexApiExecutor) {
+ super(cacheService, dateTimeScalarType, dataIndexApiExecutor);
+ }
+
public GraphQLSchema createSchema() {
TypeDefinitionRegistry typeDefinitionRegistry = new
TypeDefinitionRegistry();
-
typeDefinitionRegistry.merge(loadSchemaDefinitionFile("basic.schema.graphqls"));
+
typeDefinitionRegistry.merge(loadSchemaDefinitionFile("graphql/basic.schema.graphqls"));
addCountQueries(typeDefinitionRegistry);
addJsonQueries(typeDefinitionRegistry);
loadAdditionalMutations(typeDefinitionRegistry);
diff --git
a/data-index/data-index-graphql-addons/src/main/resources/META-INF/beans.xml
b/data-index/data-index-graphql-addons/src/main/resources/META-INF/beans.xml
new file mode 100644
index 000000000..cf613e847
--- /dev/null
+++ b/data-index/data-index-graphql-addons/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,19 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
diff --git
a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
index 5447ab93e..bf94239b8 100644
---
a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
+++
b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
@@ -71,15 +71,19 @@ public abstract class AbstractGraphQLSchemaManager
implements GraphQLSchemaManag
private static final Logger LOGGER =
LoggerFactory.getLogger(AbstractGraphQLSchemaManager.class);
- @Inject
DataIndexStorageService cacheService;
- @Inject
GraphQLScalarType dateTimeScalarType;
- @Inject
KogitoRuntimeClient dataIndexApiExecutor;
+ @Inject
+ public AbstractGraphQLSchemaManager(DataIndexStorageService cacheService,
GraphQLScalarType dateTimeScalarType, KogitoRuntimeClient dataIndexApiExecutor)
{
+ this.cacheService = cacheService;
+ this.dateTimeScalarType = dateTimeScalarType;
+ this.dataIndexApiExecutor = dataIndexApiExecutor;
+ }
+
private GraphQLSchema schema;
private Collection<GraphQLMutationsProvider> mutations;
@@ -109,13 +113,13 @@ public abstract class AbstractGraphQLSchemaManager
implements GraphQLSchemaManag
protected final void addCountQueries(TypeDefinitionRegistry typeRegistry) {
if (supportsCount()) {
-
typeRegistry.merge(loadSchemaDefinitionFile("count.schema.graphqls"));
+
typeRegistry.merge(loadSchemaDefinitionFile("graphql/count.schema.graphqls"));
}
}
protected final void addJsonQueries(TypeDefinitionRegistry typeRegistry) {
if
(cacheService.capabilities().contains(StorageServiceCapability.JSON_QUERY)) {
-
typeRegistry.merge(loadSchemaDefinitionFile("json.schema.graphqls"));
+
typeRegistry.merge(loadSchemaDefinitionFile("graphql/json.schema.graphqls"));
}
}
diff --git
a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLInstrumentation.java
b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLInstrumentation.java
index 65b3b82b6..ee0e817e4 100644
---
a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLInstrumentation.java
+++
b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLInstrumentation.java
@@ -33,9 +33,13 @@ import jakarta.inject.Inject;
@ApplicationScoped
public class GraphQLInstrumentation extends SimpleInstrumentation {
- @Inject
GraphQLSchemaManager manager;
+ @Inject
+ public GraphQLInstrumentation(GraphQLSchemaManager manager) {
+ this.manager = manager;
+ }
+
@Override
public DataFetcher<?> instrumentDataFetcher(DataFetcher<?> dataFetcher,
InstrumentationFieldFetchParameters parameters, InstrumentationState
instrumentationState) {
if (parameters.getEnvironment().getSource() instanceof JsonNode &&
dataFetcher instanceof PropertyDataFetcher) {
diff --git
a/data-index/data-index-graphql/src/main/resources/basic.schema.graphqls
b/data-index/data-index-graphql/src/main/resources/graphql/basic.schema.graphqls
similarity index 100%
rename from
data-index/data-index-graphql/src/main/resources/basic.schema.graphqls
rename to
data-index/data-index-graphql/src/main/resources/graphql/basic.schema.graphqls
diff --git
a/data-index/data-index-graphql/src/main/resources/count.schema.graphqls
b/data-index/data-index-graphql/src/main/resources/graphql/count.schema.graphqls
similarity index 100%
rename from
data-index/data-index-graphql/src/main/resources/count.schema.graphqls
rename to
data-index/data-index-graphql/src/main/resources/graphql/count.schema.graphqls
diff --git
a/data-index/data-index-graphql/src/main/resources/json.schema.graphqls
b/data-index/data-index-graphql/src/main/resources/graphql/json.schema.graphqls
similarity index 100%
rename from
data-index/data-index-graphql/src/main/resources/json.schema.graphqls
rename to
data-index/data-index-graphql/src/main/resources/graphql/json.schema.graphqls
diff --git a/data-index/data-index-quarkus/data-index-graphql-quarkus/pom.xml
b/data-index/data-index-quarkus/data-index-graphql-quarkus/pom.xml
index 5f64ef6c7..5a0b0e68c 100644
--- a/data-index/data-index-quarkus/data-index-graphql-quarkus/pom.xml
+++ b/data-index/data-index-quarkus/data-index-graphql-quarkus/pom.xml
@@ -42,5 +42,15 @@
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-common-quarkus</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
diff --git
a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
b/data-index/data-index-quarkus/data-index-graphql-quarkus/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
similarity index 100%
copy from
data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
copy to
data-index/data-index-quarkus/data-index-graphql-quarkus/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
diff --git
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/pom.xml
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/pom.xml
index 4994c823d..ceb58da3d 100644
---
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/pom.xml
+++
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/pom.xml
@@ -42,7 +42,7 @@
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
- <artifactId>data-index-addons-common</artifactId>
+ <artifactId>data-index-common-addons</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
diff --git
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/AbstractKogitoAddonsQuarkusDataIndexProcessor.java
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/AbstractKogitoAddonsQuarkusDataIndexProcessor.java
index 6a319765a..b7e6e0503 100644
---
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/AbstractKogitoAddonsQuarkusDataIndexProcessor.java
+++
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/AbstractKogitoAddonsQuarkusDataIndexProcessor.java
@@ -75,7 +75,7 @@ public abstract class
AbstractKogitoAddonsQuarkusDataIndexProcessor extends OneO
@BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
public void nativeResources(BuildProducer<NativeImageResourceBuildItem>
resource,
BuildProducer<ReflectiveHierarchyBuildItem>
reflectiveHierarchyClass) {
- resource.produce(new
NativeImageResourceBuildItem("basic.schema.graphqls"));
+ resource.produce(new
NativeImageResourceBuildItem("graphql/basic.schema.graphqls"));
resource.produce(new
NativeImageResourceBuildItem("io/vertx/ext/web/handler/graphiql/index.html"));
reflectiveHierarchy(Node.class, reflectiveHierarchyClass);
reflectiveHierarchy(ProcessDefinition.class, reflectiveHierarchyClass);
diff --git
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/pom.xml
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/pom.xml
index c52655735..471aac331 100644
---
a/data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/pom.xml
+++
b/data-index/data-index-quarkus/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/pom.xml
@@ -43,6 +43,10 @@
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-graphql-quarkus</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index-graphql-addons</artifactId>
+ </dependency>
</dependencies>
<build>
<plugins>
diff --git
a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerImpl.java
b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerImpl.java
index 723defd48..9dc6caea7 100644
---
a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerImpl.java
+++
b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerImpl.java
@@ -24,11 +24,13 @@ import java.util.List;
import java.util.Optional;
import java.util.function.Supplier;
+import org.kie.kogito.index.api.KogitoRuntimeClient;
import org.kie.kogito.index.graphql.AbstractGraphQLSchemaManager;
import org.kie.kogito.index.graphql.query.GraphQLQueryParserRegistry;
import org.kie.kogito.index.json.DataIndexParsingException;
import org.kie.kogito.index.model.ProcessInstanceState;
import org.kie.kogito.index.service.DataIndexServiceException;
+import org.kie.kogito.index.storage.DataIndexStorageService;
import org.kie.kogito.persistence.api.StorageFetcher;
import org.reactivestreams.Publisher;
@@ -36,15 +38,13 @@ import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import graphql.scalars.ExtendedScalars;
-import graphql.schema.DataFetcher;
-import graphql.schema.DataFetchingEnvironment;
-import graphql.schema.GraphQLInputObjectType;
-import graphql.schema.GraphQLSchema;
+import graphql.schema.*;
import graphql.schema.idl.RuntimeWiring;
import graphql.schema.idl.SchemaGenerator;
import graphql.schema.idl.TypeDefinitionRegistry;
import jakarta.annotation.PostConstruct;
import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
import static java.lang.String.format;
import static java.util.stream.Collectors.toList;
@@ -60,6 +60,17 @@ public class GraphQLSchemaManagerImpl extends
AbstractGraphQLSchemaManager {
private static final String JOB_UPDATED = "JobUpdated";
private static final String JOB_ADDED = "JobAdded";
+ GraphQLSchemaManagerImpl() {
+ this(null, null, null);
+ // Test constructor
+ }
+
+ @Inject
+ public GraphQLSchemaManagerImpl(DataIndexStorageService cacheService,
GraphQLScalarType dateTimeScalarType,
+ KogitoRuntimeClient dataIndexApiExecutor) {
+ super(cacheService, dateTimeScalarType, dataIndexApiExecutor);
+ }
+
@Override
@PostConstruct
public void setup() {
@@ -72,7 +83,7 @@ public class GraphQLSchemaManagerImpl extends
AbstractGraphQLSchemaManager {
@Override
public GraphQLSchema createSchema() {
TypeDefinitionRegistry typeDefinitionRegistry = new
TypeDefinitionRegistry();
-
typeDefinitionRegistry.merge(loadSchemaDefinitionFile("basic.schema.graphqls"));
+
typeDefinitionRegistry.merge(loadSchemaDefinitionFile("graphql/basic.schema.graphqls"));
typeDefinitionRegistry.merge(loadSchemaDefinitionFile("domain.schema.graphqls"));
addCountQueries(typeDefinitionRegistry);
addJsonQueries(typeDefinitionRegistry);
diff --git
a/data-index/data-index-springboot/data-index-addons-common-springboot/pom.xml
b/data-index/data-index-springboot/data-index-common-addons-springboot/pom.xml
similarity index 91%
rename from
data-index/data-index-springboot/data-index-addons-common-springboot/pom.xml
rename to
data-index/data-index-springboot/data-index-common-addons-springboot/pom.xml
index c2b0a9701..9c97a426e 100644
---
a/data-index/data-index-springboot/data-index-addons-common-springboot/pom.xml
+++
b/data-index/data-index-springboot/data-index-common-addons-springboot/pom.xml
@@ -28,8 +28,8 @@
<version>999-SNAPSHOT</version>
</parent>
- <artifactId>data-index-addons-common-springboot</artifactId>
- <name>Kogito Apps :: Data Index Add-Ons SpringBoot Common</name>
+ <artifactId>data-index-common-addons-springboot</artifactId>
+ <name>Kogito Apps :: Kogito Data Index SpringBoot Add-Ons Common</name>
<properties>
<java.module.name>org.kie.kogito.index.springboot.addons.common</java.module.name>
@@ -42,7 +42,7 @@
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
- <artifactId>data-index-addons-common</artifactId>
+ <artifactId>data-index-common-addons</artifactId>
</dependency>
<dependency>
<groupId>org.kie</groupId>
diff --git
a/data-index/data-index-springboot/data-index-addons-common-springboot/src/main/java/org/kie/kogito/index/sprinboot/addon/DataIndexAddonBeansProducer.java
b/data-index/data-index-springboot/data-index-common-addons-springboot/src/main/java/org/kie/kogito/index/sprinboot/addon/DataIndexAddonBeansProducer.java
similarity index 100%
rename from
data-index/data-index-springboot/data-index-addons-common-springboot/src/main/java/org/kie/kogito/index/sprinboot/addon/DataIndexAddonBeansProducer.java
rename to
data-index/data-index-springboot/data-index-common-addons-springboot/src/main/java/org/kie/kogito/index/sprinboot/addon/DataIndexAddonBeansProducer.java
diff --git
a/data-index/data-index-springboot/data-index-graphql-addons-springboot/pom.xml
b/data-index/data-index-springboot/data-index-graphql-addons-springboot/pom.xml
new file mode 100644
index 000000000..69815b552
--- /dev/null
+++
b/data-index/data-index-springboot/data-index-graphql-addons-springboot/pom.xml
@@ -0,0 +1,67 @@
+<?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 xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>data-index-springboot</artifactId>
+ <groupId>org.kie.kogito</groupId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>data-index-graphql-addons-springboot</artifactId>
+ <name>Kogito Apps :: Kogito Data Index SpringBoot Add-ons GraphQL</name>
+
+ <properties>
+
<java.module.name>org.kie.kogito.index.springboot.addons.graphql</java.module.name>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index-graphql-addons</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter</artifactId>
+ <version>${version.org.springframework.boot}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <version>${version.org.springframework.boot}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-graphql</artifactId>
+ <version>${version.org.springframework.boot}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.graphql-java</groupId>
+ <artifactId>graphql-java</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.graphql-java</groupId>
+ <artifactId>graphql-java-extended-scalars</artifactId>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
diff --git
a/data-index/data-index-springboot/data-index-graphql-addons-springboot/src/main/java/org/kie/kogito/index/springboot/addon/env/DataIndexURLConfiguration.java
b/data-index/data-index-springboot/data-index-graphql-addons-springboot/src/main/java/org/kie/kogito/index/springboot/addon/env/DataIndexURLConfiguration.java
new file mode 100644
index 000000000..55c919094
--- /dev/null
+++
b/data-index/data-index-springboot/data-index-graphql-addons-springboot/src/main/java/org/kie/kogito/index/springboot/addon/env/DataIndexURLConfiguration.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.kogito.index.springboot.addon.env;
+
+import java.util.Properties;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.env.ConfigurableEnvironment;
+import org.springframework.core.env.MutablePropertySources;
+import org.springframework.core.env.PropertiesPropertySource;
+
+import jakarta.annotation.PostConstruct;
+
+@Configuration
+public class DataIndexURLConfiguration {
+ private static final String KOGITO_DATA_INDEX_URL_PROP =
"kogito.data-index.url";
+ private static final String KOGITO_DATAINDEX_HTTP_URL_PROP =
"kogito.dataindex.http.url";
+
+ @Value("${server.address:localhost}")
+ String serverAddress;
+
+ @Value("${server.port:8080}")
+ String serverPort;
+
+ @Value("${kogito.service.url:null}")
+ String kogitoServiceUrl;
+
+ @Autowired
+ ConfigurableEnvironment environment;
+
+ @PostConstruct
+ public void initDataIndexDefaultURl() {
+ if (environment.containsProperty(KOGITO_DATA_INDEX_URL_PROP)) {
+ return;
+ }
+ String dataIndexUrl = resolveDataIndexURL(environment);
+ MutablePropertySources propertySources =
environment.getPropertySources();
+
+ Properties properties = new Properties();
+ properties.put(KOGITO_DATA_INDEX_URL_PROP, dataIndexUrl);
+ properties.put(KOGITO_DATAINDEX_HTTP_URL_PROP, dataIndexUrl);
+ propertySources.addLast(new PropertiesPropertySource("data-index-url",
properties));
+ }
+
+ private String resolveDataIndexURL(ConfigurableEnvironment environment) {
+
+ if (kogitoServiceUrl == null) {
+ return "http://" + serverAddress + ":" + serverPort;
+ }
+ return kogitoServiceUrl;
+ }
+}
diff --git
a/data-index/data-index-springboot/data-index-graphql-addons-springboot/src/main/java/org/kie/kogito/index/springboot/addon/graphiql/GraphiQlConfiguration.java
b/data-index/data-index-springboot/data-index-graphql-addons-springboot/src/main/java/org/kie/kogito/index/springboot/addon/graphiql/GraphiQlConfiguration.java
new file mode 100644
index 000000000..916c21a3e
--- /dev/null
+++
b/data-index/data-index-springboot/data-index-graphql-addons-springboot/src/main/java/org/kie/kogito/index/springboot/addon/graphiql/GraphiQlConfiguration.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.kogito.index.springboot.addon.graphiql;
+
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.annotation.Order;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.graphql.server.webmvc.GraphiQlHandler;
+import org.springframework.web.servlet.function.RouterFunction;
+import org.springframework.web.servlet.function.RouterFunctions;
+import org.springframework.web.servlet.function.ServerResponse;
+
+/**
+ * Providing new Graphiql UI since the one provided by Spring Graphql based on
the deprecated UMD presents some issues.
+ * TODO: remove when updated
+ */
+@Configuration
+@ConditionalOnProperty(name = "spring.graphql.graphiql.enabled", havingValue =
"true")
+public class GraphiQlConfiguration {
+
+ @Bean
+ @Order(0)
+ public RouterFunction<ServerResponse> graphiQlRouterFunction() {
+ RouterFunctions.Builder builder = RouterFunctions.route();
+ ClassPathResource graphiQlPage = new
ClassPathResource("data-index/graphiql/index.html");
+ GraphiQlHandler graphiQLHandler = new GraphiQlHandler("/graphql", "",
graphiQlPage);
+ builder = builder.GET("/graphiql", graphiQLHandler::handleRequest);
+ return builder.build();
+ }
+}
diff --git
a/data-index/data-index-springboot/data-index-graphql-addons-springboot/src/main/java/org/kie/kogito/index/springboot/addon/graphql/DataIndexGraphqlProducer.java
b/data-index/data-index-springboot/data-index-graphql-addons-springboot/src/main/java/org/kie/kogito/index/springboot/addon/graphql/DataIndexGraphqlProducer.java
new file mode 100644
index 000000000..72d3d948c
--- /dev/null
+++
b/data-index/data-index-springboot/data-index-graphql-addons-springboot/src/main/java/org/kie/kogito/index/springboot/addon/graphql/DataIndexGraphqlProducer.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.kogito.index.springboot.addon.graphql;
+
+import java.util.List;
+import java.util.Optional;
+
+import org.kie.kogito.index.addon.graphql.GraphQLAddonSchemaManagerImpl;
+import org.kie.kogito.index.api.DateTimeCoercing;
+import org.kie.kogito.index.api.DefaultDateTimeCoercing;
+import org.kie.kogito.index.api.KogitoRuntimeClient;
+import org.kie.kogito.index.graphql.GraphQLInstrumentation;
+import org.kie.kogito.index.graphql.GraphQLScalarTypeProducer;
+import org.kie.kogito.index.graphql.GraphQLSchemaManager;
+import org.kie.kogito.index.storage.DataIndexStorageService;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.graphql.execution.GraphQlSource;
+
+import graphql.execution.instrumentation.Instrumentation;
+import graphql.schema.GraphQLScalarType;
+
+@Configuration
+public class DataIndexGraphqlProducer {
+
+ @Bean
+ public GraphQlSource graphQLSource(GraphQLSchemaManager
graphQLSchemaManager, List<Instrumentation> instrumentations) {
+ return GraphQlSource.builder(graphQLSchemaManager.getGraphQLSchema())
+ .instrumentation(instrumentations)
+ .build();
+ }
+
+ @Bean
+ public GraphQLScalarType
createGraphQLScalarType(Optional<DateTimeCoercing> dateTimeCoercing) {
+ return new GraphQLScalarTypeProducer(dateTimeCoercing.orElse(new
DefaultDateTimeCoercing())).dateTimeScalar();
+ }
+
+ @Bean
+ public GraphQLSchemaManager graphQLSchemaManager(DataIndexStorageService
storageService, GraphQLScalarType dateTimeScalarType,
+ KogitoRuntimeClient dataIndexApiExecutor) {
+ return new GraphQLAddonSchemaManagerImpl(storageService,
dateTimeScalarType, dataIndexApiExecutor);
+ }
+
+ @Bean
+ public GraphQLInstrumentation
createGraphQLInstrumentation(GraphQLSchemaManager schemaManager) {
+ return new GraphQLInstrumentation(schemaManager);
+ }
+
+}
diff --git
a/data-index/data-index-springboot/data-index-graphql-addons-springboot/src/main/resources/data-index/graphiql/index.html
b/data-index/data-index-springboot/data-index-graphql-addons-springboot/src/main/resources/data-index/graphiql/index.html
new file mode 100644
index 000000000..4f0ab4ec2
--- /dev/null
+++
b/data-index/data-index-springboot/data-index-graphql-addons-springboot/src/main/resources/data-index/graphiql/index.html
@@ -0,0 +1,110 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<!--
+ This page is based on
https://github.com/graphql/graphiql/tree/main/examples/graphiql-cdn from the
official
+ GraphiQL project.
+-->
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>GraphiQL</title>
+ <style>
+ body {
+ margin: 0;
+ }
+
+ #graphiql {
+ height: 100dvh;
+ }
+
+ .loading {
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 4rem;
+ }
+ </style>
+ <link rel="stylesheet" href="https://esm.sh/graphiql/dist/style.css" />
+ <link
+ rel="stylesheet"
+ href="https://esm.sh/@graphiql/plugin-explorer/dist/style.css"
+ />
+ <!--
+ * Note:
+ * The ?standalone flag bundles the module along with all of its
`dependencies`, excluding `peerDependencies`, into a single JavaScript file.
+ * `@emotion/is-prop-valid` is a shim to remove the console error ` module
"@emotion /is-prop-valid" not found`. Upstream issue:
https://github.com/motiondivision/motion/issues/3126
+ -->
+ <script type="importmap">
+ {
+ "imports": {
+ "react": "https://esm.sh/[email protected]",
+ "react/": "https://esm.sh/[email protected]/",
+
+ "react-dom": "https://esm.sh/[email protected]",
+ "react-dom/": "https://esm.sh/[email protected]/",
+
+ "graphiql":
"https://esm.sh/graphiql?standalone&external=react,react-dom,@graphiql/react,graphql",
+ "graphiql/": "https://esm.sh/graphiql/",
+ "@graphiql/plugin-explorer":
"https://esm.sh/@graphiql/plugin-explorer?standalone&external=react,@graphiql/react,graphql",
+ "@graphiql/react":
"https://esm.sh/@graphiql/react?standalone&external=react,react-dom,graphql,@graphiql/toolkit,@emotion/is-prop-valid",
+
+ "@graphiql/toolkit":
"https://esm.sh/@graphiql/toolkit?standalone&external=graphql",
+ "graphql": "https://esm.sh/[email protected]",
+ "@emotion/is-prop-valid": "data:text/javascript,"
+ }
+ }
+ </script>
+ <script type="module">
+ import React from 'react';
+ import ReactDOM from 'react-dom/client';
+ import { GraphiQL, HISTORY_PLUGIN } from 'graphiql';
+ import { createGraphiQLFetcher } from '@graphiql/toolkit';
+ import { explorerPlugin } from '@graphiql/plugin-explorer';
+ import 'graphiql/setup-workers/esm.sh';
+
+ const params = new URLSearchParams(window.location.search);
+ const path = params.get("path") || "/graphql";
+
+ const fetcher = createGraphiQLFetcher({
+ url: `${location.protocol}//${location.host}${path}`,
+ });
+ const plugins = [HISTORY_PLUGIN, explorerPlugin()];
+
+ function App() {
+ return React.createElement(GraphiQL, {
+ fetcher,
+ plugins,
+ defaultEditorToolsVisibility: true,
+ });
+ }
+
+ const container = document.getElementById('graphiql');
+ const root = ReactDOM.createRoot(container);
+ root.render(React.createElement(App));
+ </script>
+</head>
+<body>
+<div id="graphiql">
+ <div class="loading">Loading…</div>
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git
a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
b/data-index/data-index-springboot/data-index-storage-jpa-springboot/src/main/java/org/kie/kogito/index/jpa/springboot/storage/DataIndexJPAStorageSpringBootSharedConfiguration.java
similarity index 60%
copy from
data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
copy to
data-index/data-index-springboot/data-index-storage-jpa-springboot/src/main/java/org/kie/kogito/index/jpa/springboot/storage/DataIndexJPAStorageSpringBootSharedConfiguration.java
index 69e05738c..bda311af4 100644
---
a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
+++
b/data-index/data-index-springboot/data-index-storage-jpa-springboot/src/main/java/org/kie/kogito/index/jpa/springboot/storage/DataIndexJPAStorageSpringBootSharedConfiguration.java
@@ -16,26 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.kie.kogito.index.graphql;
-import graphql.GraphQL;
-import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.enterprise.inject.Produces;
-import jakarta.inject.Inject;
+package org.kie.kogito.index.jpa.springboot.storage;
-@ApplicationScoped
-public class GraphQLProducer {
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.util.ResourceUtils;
- @Inject
- GraphQLInstrumentation instrumentation;
-
- @Inject
- GraphQLSchemaManager manager;
-
- @Produces
- public GraphQL createGraphQL() {
- return GraphQL.newGraphQL(manager.getGraphQLSchema())
- .instrumentation(instrumentation)
- .build();
- }
-}
+@Configuration
+@PropertySource(ResourceUtils.CLASSPATH_URL_PREFIX +
"/data-index-jpa.properties")
+public class DataIndexJPAStorageSpringBootSharedConfiguration {
+}
\ No newline at end of file
diff --git
a/data-index/data-index-springboot/data-index-storage-jpa-springboot/src/main/resources/application.properties
b/data-index/data-index-springboot/data-index-storage-jpa-springboot/src/main/resources/data-index-jpa.properties
similarity index 100%
copy from
data-index/data-index-springboot/data-index-storage-jpa-springboot/src/main/resources/application.properties
copy to
data-index/data-index-springboot/data-index-storage-jpa-springboot/src/main/resources/data-index-jpa.properties
diff --git
a/data-index/data-index-springboot/kogito-addons-springboot-data-index-persistence/kogito-addons-springboot-data-index-persistence-jpa-parent/kogito-addons-springboot-data-index-persistence-jpa/pom.xml
b/data-index/data-index-springboot/kogito-addons-springboot-data-index-persistence/kogito-addons-springboot-data-index-persistence-jpa-parent/kogito-addons-springboot-data-index-persistence-jpa/pom.xml
index a5f71818f..c349751d0 100644
---
a/data-index/data-index-springboot/kogito-addons-springboot-data-index-persistence/kogito-addons-springboot-data-index-persistence-jpa-parent/kogito-addons-springboot-data-index-persistence-jpa/pom.xml
+++
b/data-index/data-index-springboot/kogito-addons-springboot-data-index-persistence/kogito-addons-springboot-data-index-persistence-jpa-parent/kogito-addons-springboot-data-index-persistence-jpa/pom.xml
@@ -32,13 +32,13 @@
<name>Kogito Apps :: Kogito Addons SpringBoot Data Index Persistence
JPA</name>
<properties>
-
<java.module.name>org.kie.kogito.index.springboot.data.index.persistence.jpa</java.module.name>
+
<java.module.name>org.kie.kogito.index.springboot.addon.data.index.persistence.jpa</java.module.name>
</properties>
<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
- <artifactId>data-index-addons-common-springboot</artifactId>
+ <artifactId>data-index-common-addons-springboot</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
diff --git
a/data-index/data-index-springboot/kogito-addons-springboot-data-index-persistence/pom.xml
b/data-index/data-index-springboot/kogito-addons-springboot-data-index-persistence/pom.xml
index a2ba7108e..805b95cef 100644
---
a/data-index/data-index-springboot/kogito-addons-springboot-data-index-persistence/pom.xml
+++
b/data-index/data-index-springboot/kogito-addons-springboot-data-index-persistence/pom.xml
@@ -35,8 +35,6 @@
<modules>
<module>kogito-addons-springboot-data-index-persistence-jpa-parent</module>
-
<!--<module>kogito-springboot-quarkus-data-index-persistence-postgresql</module>-->
-
<!--<module>kogito-addons-springboot-data-index-persistence-mongodb</module>-->
</modules>
</project>
diff --git
a/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/pom.xml
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/pom.xml
new file mode 100644
index 000000000..836f593a7
--- /dev/null
+++
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/pom.xml
@@ -0,0 +1,195 @@
+<?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-springboot-data-index-jpa-parent</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
+
<artifactId>kogito-addons-springboot-data-index-jpa-integration-tests-process</artifactId>
+ <name>Kogito Apps :: Kogito Addons SpringBoot Data Index JPA ::
Integration tests :. Process</name>
+
+ <properties>
+
<java.module.name>org.kie.kogito.index.springboot.data.index.jpa.it.process</java.module.name>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-actuator</artifactId>
+ <version>${version.org.springframework.boot}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-springboot-data-index-jpa</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-springboot-flyway</artifactId>
+ </dependency>
+
+ <!-- jBPM -->
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-spring-boot-starter</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-springboot-persistence-jdbc</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.kie</groupId>
+ <artifactId>kie-addons-springboot-process-svg</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-jdbc</artifactId>
+ <version>${version.org.springframework.boot}</version>
+ </dependency>
+
+ <!-- Test -->
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index-test-utils</artifactId>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-quarkus-test-utils</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-spring-boot-test-utils</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <version>${version.org.springframework.boot}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>json-schema-validator</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.awaitility</groupId>
+ <artifactId>awaitility</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+
<outputDirectory>${project.basedir}/target/generated-resources</outputDirectory>
+ <resources>
+ <resource>
+
<directory>${project.parent.basedir}/integration-tests-data-index-service-common/src/main/resources</directory>
+ <includes>
+ <include>**/*.bpmn</include>
+ </includes>
+ </resource>
+ <resource>
+
<directory>${project.parent.basedir}/integration-tests-data-index-service-quarkus/src/main/resources</directory>
+ <includes>
+ <include>**/*.sql</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <version>${version.org.springframework.boot}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>generateModel</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <skip>${skip.springboot}</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git
a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/main/java/org/kie/kogito/KogitoSpringBootApplication.java
similarity index 60%
rename from
data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
rename to
data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/main/java/org/kie/kogito/KogitoSpringBootApplication.java
index 69e05738c..0190d4a60 100644
---
a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
+++
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/main/java/org/kie/kogito/KogitoSpringBootApplication.java
@@ -16,26 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.kie.kogito.index.graphql;
+package org.kie.kogito;
-import graphql.GraphQL;
-import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.enterprise.inject.Produces;
-import jakarta.inject.Inject;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
-@ApplicationScoped
-public class GraphQLProducer {
+@SpringBootApplication(scanBasePackages = { "org.kie.kogito.**",
"com.example.**" })
+public class KogitoSpringBootApplication {
- @Inject
- GraphQLInstrumentation instrumentation;
-
- @Inject
- GraphQLSchemaManager manager;
-
- @Produces
- public GraphQL createGraphQL() {
- return GraphQL.newGraphQL(manager.getGraphQLSchema())
- .instrumentation(instrumentation)
- .build();
+ public static void main(String[] args) {
+ SpringApplication.run(KogitoSpringBootApplication.class, args);
}
}
diff --git
a/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/main/resources/META-INF/processSVG/hello.svg
new file mode 100644
index 000000000..716974fb8
--- /dev/null
+++
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/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/data-index-springboot/data-index-storage-jpa-springboot/src/main/resources/application.properties
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/main/resources/application.properties
similarity index 73%
rename from
data-index/data-index-springboot/data-index-storage-jpa-springboot/src/main/resources/application.properties
rename to
data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/main/resources/application.properties
index 1985f9d1e..26d34ed6a 100644
---
a/data-index/data-index-springboot/data-index-storage-jpa-springboot/src/main/resources/application.properties
+++
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/main/resources/application.properties
@@ -17,4 +17,13 @@
# under the License.
#
-spring.datasource.hikari.data-source-properties."stringtype"=unspecified
\ No newline at end of file
+kogito.service.url=http://${server.address:localhost}:${server.port:8080}
+kogito.persistence.type=jdbc
+
+# Flyway
+kie.flyway.enabled=true
+
+# Disabling Spring-Boot Flyway to avoid unnecessary Data Base initialization
+spring.flyway.enabled=false
+
+spring.graphql.graphiql.enabled=true
\ No newline at end of file
diff --git
a/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/main/resources/hello.bpmn
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/main/resources/hello.bpmn
new file mode 100644
index 000000000..939c411bb
--- /dev/null
+++
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/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/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/test/java/org/kie/kogito/index/sprinboot/addon/it/JPASpringBootAddonDataIndexTest.java
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/test/java/org/kie/kogito/index/sprinboot/addon/it/JPASpringBootAddonDataIndexTest.java
new file mode 100644
index 000000000..2a8cae3d4
--- /dev/null
+++
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/integration-tests-process/src/test/java/org/kie/kogito/index/sprinboot/addon/it/JPASpringBootAddonDataIndexTest.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.sprinboot.addon.it;
+
+import java.util.Map;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.kie.kogito.KogitoSpringBootApplication;
+import
org.kie.kogito.testcontainers.springboot.PostgreSqlSpringBootTestResource;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.web.server.LocalServerPort;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit.jupiter.SpringExtension;
+
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+
+import static
io.restassured.RestAssured.enableLoggingOfRequestAndResponseIfValidationFails;
+import static io.restassured.RestAssured.given;
+import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
+import static org.hamcrest.CoreMatchers.*;
+
+@ExtendWith(SpringExtension.class)
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
classes = KogitoSpringBootApplication.class)
+@ContextConfiguration(initializers = PostgreSqlSpringBootTestResource.class)
+@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
+class JPASpringBootAddonDataIndexTest {
+
+ @LocalServerPort
+ int randomServerPort;
+
+ static {
+ enableLoggingOfRequestAndResponseIfValidationFails();
+ }
+
+ @BeforeEach
+ void setPort() {
+ RestAssured.port = randomServerPort;
+ }
+
+ @Test
+ void testDataIndexAddon() {
+ String processDefId = "hello";
+ given().contentType(ContentType.JSON).body("{ \"query\" :
\"{ProcessDefinitions(where: { id: {equal: \\\"" + processDefId +
+ "\\\"}}){ id, version, name, addons, nodes { 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"))
+ .body("data.ProcessDefinitions[0].addons", allOf(
+ hasItem("jdbc-persistence"),
+ hasItem("process-svg")))
+ .body("data.ProcessDefinitions[0].nodes.size()", is(2));
+
+ String processInstanceId = given()
+ .contentType(ContentType.JSON)
+ .accept(ContentType.JSON)
+ .body(Map.of())
+ .post("/hello")
+ .then()
+ .statusCode(201)
+ .body("id", is(notNullValue()))
+ .extract().path("id");
+
+ assertThat(processInstanceId)
+ .isNotBlank();
+
+ given().contentType(ContentType.JSON)
+ .body("{ \"query\" : \"{ProcessInstances(where: { id: {equal:
\\\"" + processInstanceId + "\\\"}}){ id, state, 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].nodeDefinitions.size()",
is(2));
+ }
+
+ @Test
+ void testGraphQLUI() {
+ given().contentType(ContentType.HTML)
+ .when().get("/graphiql")
+ .then().statusCode(200)
+ .body("html.head.title", containsString("GraphiQL"));
+ }
+
+}
diff --git
a/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/kogito-addons-springboot-data-index-jpa/pom.xml
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/kogito-addons-springboot-data-index-jpa/pom.xml
new file mode 100644
index 000000000..b5b3b0435
--- /dev/null
+++
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/kogito-addons-springboot-data-index-jpa/pom.xml
@@ -0,0 +1,46 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<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-springboot-data-index-jpa-parent</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>kogito-addons-springboot-data-index-jpa</artifactId>
+ <name>Kogito Apps :: Kogito Addons SpringBoot Data Index Persistence
JPA</name>
+
+ <properties>
+
<java.module.name>org.kie.kogito.index.springboot.addon.data.index.jpa</java.module.name>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index-graphql-addons-springboot</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-springboot-data-index-persistence-jpa</artifactId>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
diff --git
a/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/pom.xml
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/pom.xml
new file mode 100644
index 000000000..198e93b9a
--- /dev/null
+++
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/kogito-addons-springboot-data-index-jpa-parent/pom.xml
@@ -0,0 +1,38 @@
+<?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-springboot-data-index</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>kogito-addons-springboot-data-index-jpa-parent</artifactId>
+ <name>Kogito Apps :: Kogito Addons SpringBoot Data Index JPA
(Parent)</name>
+
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>kogito-addons-springboot-data-index-jpa</module>
+ <module>integration-tests-process</module>
+ </modules>
+</project>
diff --git
a/data-index/data-index-springboot/kogito-addons-springboot-data-index/pom.xml
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/pom.xml
new file mode 100644
index 000000000..355f599f0
--- /dev/null
+++
b/data-index/data-index-springboot/kogito-addons-springboot-data-index/pom.xml
@@ -0,0 +1,38 @@
+<?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 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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index-springboot</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.kie</groupId>
+ <artifactId>kogito-addons-springboot-data-index</artifactId>
+ <name>Kogito Apps :: Kogito Addons SpringBoot Data Index (Parent)</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>kogito-addons-springboot-data-index-jpa-parent</module>
+ </modules>
+
+</project>
diff --git a/data-index/data-index-springboot/pom.xml
b/data-index/data-index-springboot/pom.xml
index 980c189e0..e12657d33 100644
--- a/data-index/data-index-springboot/pom.xml
+++ b/data-index/data-index-springboot/pom.xml
@@ -32,8 +32,10 @@
<packaging>pom</packaging>
<modules>
<module>data-index-common-springboot</module>
- <module>data-index-addons-common-springboot</module>
+ <module>data-index-common-addons-springboot</module>
<module>data-index-storage-jpa-springboot</module>
+ <module>data-index-graphql-addons-springboot</module>
<module>kogito-addons-springboot-data-index-persistence</module>
+ <module>kogito-addons-springboot-data-index</module>
</modules>
</project>
\ No newline at end of file
diff --git a/data-index/pom.xml b/data-index/pom.xml
index 6e05b97cf..e9ba0100e 100644
--- a/data-index/pom.xml
+++ b/data-index/pom.xml
@@ -39,9 +39,10 @@
<module>data-index-common</module>
<module>data-index-test-utils</module>
<module>data-index-graphql</module>
+ <module>data-index-graphql-addons</module>
<module>data-index-service</module>
<module>data-index-mutations</module>
- <module>data-index-addons-common</module>
+ <module>data-index-common-addons</module>
<module>data-index-quarkus</module>
<module>data-index-springboot</module>
</modules>
diff --git
a/jobs-service/kogito-addons-jobs-service/kogito-addons-quarkus-jobs-service-embedded/runtime/src/main/java/org/kie/kogito/addons/quarkus/jobs/service/embedded/stream/EventPublisherJobStreams.java
b/jobs-service/kogito-addons-jobs-service/kogito-addons-quarkus-jobs-service-embedded/runtime/src/main/java/org/kie/kogito/addons/quarkus/jobs/service/embedded/stream/EventPublisherJobStreams.java
index 7032eebd3..1def45a12 100644
---
a/jobs-service/kogito-addons-jobs-service/kogito-addons-quarkus-jobs-service-embedded/runtime/src/main/java/org/kie/kogito/addons/quarkus/jobs/service/embedded/stream/EventPublisherJobStreams.java
+++
b/jobs-service/kogito-addons-jobs-service/kogito-addons-quarkus-jobs-service-embedded/runtime/src/main/java/org/kie/kogito/addons/quarkus/jobs/service/embedded/stream/EventPublisherJobStreams.java
@@ -52,7 +52,7 @@ import static
org.kie.kogito.jobs.service.events.JobDataEvent.JOB_EVENT_TYPE;
@Alternative
public class EventPublisherJobStreams implements JobEventPublisher {
- public static final String DATA_INDEX_EVENT_PUBLISHER =
"org.kie.kogito.index.addon.DataIndexEventPublisher";
+ public static final String DATA_INDEX_EVENT_PUBLISHER =
"org.kie.kogito.index.addon.event.DataIndexEventPublisher";
private static final Logger LOGGER =
LoggerFactory.getLogger(EventPublisherJobStreams.class);
diff --git a/kogito-apps-bom/pom.xml b/kogito-apps-bom/pom.xml
index 27b005902..fe174131f 100644
--- a/kogito-apps-bom/pom.xml
+++ b/kogito-apps-bom/pom.xml
@@ -368,12 +368,12 @@
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
- <artifactId>data-index-addons-common</artifactId>
+ <artifactId>data-index-common-addons</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
- <artifactId>data-index-addons-common</artifactId>
+ <artifactId>data-index-common-addons</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
@@ -399,6 +399,17 @@
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index-graphql-addons</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index-graphql-addons</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-graphql-quarkus</artifactId>
@@ -604,12 +615,24 @@
<dependency>
<groupId>org.kie.kogito</groupId>
- <artifactId>data-index-addons-common-springboot</artifactId>
+ <artifactId>data-index-common-addons-springboot</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index-common-addons-springboot</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>data-index-graphql-addons-springboot</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
- <artifactId>data-index-addons-common-springboot</artifactId>
+ <artifactId>data-index-graphql-addons-springboot</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
@@ -625,6 +648,17 @@
<version>${project.version}</version>
<classifier>sources</classifier>
</dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-springboot-data-index-jpa</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.kie</groupId>
+
<artifactId>kogito-addons-springboot-data-index-jpa</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
<!-- Kogito Apps Persistence -->
<dependency>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]