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-runtimes.git
The following commit(s) were added to refs/heads/main by this push:
new 011d1f930b [incubator-kie-issues-2080] Kogito data-index and
job-service readiness probes are not working as expected. (#4047)
011d1f930b is described below
commit 011d1f930b6d4523462bd29fa187a212ec795099
Author: Enrique <[email protected]>
AuthorDate: Wed Sep 10 11:14:33 2025 +0200
[incubator-kie-issues-2080] Kogito data-index and job-service readiness
probes are not working as expected. (#4047)
---
kogito-bom/pom.xml | 42 +-------
.../kogito-addons-quarkus-common-health/.gitignore | 57 -----------
.../kogito-addons-quarkus-common-health/pom.xml | 78 --------------
.../common/config/AbstractAliasConfigSource.java | 56 ----------
.../config/AbstractAliasConfigSourceFactory.java | 50 ---------
.../health/AbstractAvailabilityHealthCheck.java | 113 ---------------------
.../AbstractAvailabilityHealthCheckTest.java | 99 ------------------
.../.gitignore | 57 -----------
.../pom.xml | 83 ---------------
.../health/DataIndexAvailabilityHealthCheck.java | 47 ---------
...taIndexAvailabilityHealthCheckConfigSource.java | 43 --------
...AvailabilityHealthCheckConfigSourceFactory.java | 29 ------
.../src/main/resources/META-INF/beans.xml | 20 ----
.../io.smallrye.config.ConfigSourceFactory | 20 ----
...ataIndexServiceAvailabilityHealthCheckTest.java | 40 --------
.../.gitignore | 57 -----------
.../pom.xml | 83 ---------------
.../health/JobsServiceAvailabilityHealthCheck.java | 47 ---------
...ServiceAvailabilityHealthCheckConfigSource.java | 43 --------
...AvailabilityHealthCheckConfigSourceFactory.java | 29 ------
.../src/main/resources/META-INF/beans.xml | 20 ----
.../io.smallrye.config.ConfigSourceFactory | 20 ----
.../JobsServiceAvailabilityHealthCheckTest.java | 40 --------
quarkus/addons/common/pom.xml | 5 +-
.../addons/jobs/knative-eventing/runtime/pom.xml | 4 -
quarkus/addons/knative/eventing/runtime/pom.xml | 10 --
quarkus/addons/source-files/runtime/pom.xml | 7 +-
.../kogito-quarkus-common-deployment/pom.xml | 4 +
.../kogito-quarkus-common/pom.xml | 24 +++--
.../QuarkusProcessesLivenessHealthCheck.java | 52 ++++++++++
.../QuarkusProcessesReadinessHealthCheck.java | 52 ++++++++++
.../livereload/LiveReloadProcessorTest.java | 3 +-
springboot/bom/pom.xml | 10 ++
.../kogito-processes-spring-boot-starter/pom.xml | 4 +
.../kogito/process/ProcessesHealthIndicator.java | 47 +++++++++
35 files changed, 192 insertions(+), 1203 deletions(-)
diff --git a/kogito-bom/pom.xml b/kogito-bom/pom.xml
index 2888a60655..314c77cefc 100755
--- a/kogito-bom/pom.xml
+++ b/kogito-bom/pom.xml
@@ -1671,47 +1671,7 @@
<artifactId>kogito-addons-quarkus-jobs-knative-eventing-deployment</artifactId>
<version>${project.version}</version>
<classifier>sources</classifier>
- </dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-common-health</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-common-health</artifactId>
- <version>${project.version}</version>
- <classifier>sources</classifier>
- </dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-common-health</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-jobs-service-health</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-jobs-service-health</artifactId>
- <version>${project.version}</version>
- <classifier>sources</classifier>
- </dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-data-index-health</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-data-index-health</artifactId>
- <version>${project.version}</version>
- <classifier>sources</classifier>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kogito-addons-springboot-jobs-management</artifactId>
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-common-health/.gitignore
b/quarkus/addons/common/kogito-addons-quarkus-common-health/.gitignore
deleted file mode 100644
index eef7c80055..0000000000
--- a/quarkus/addons/common/kogito-addons-quarkus-common-health/.gitignore
+++ /dev/null
@@ -1,57 +0,0 @@
-###
-# 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.
-###
-
-target/
-!.mvn/wrapper/maven-wrapper.jar
-!**/src/main/**/target/
-!**/src/test/**/target/
-
-### IntelliJ IDEA ###
-.idea/modules.xml
-.idea/jarRepositories.xml
-.idea/compiler.xml
-.idea/libraries/
-*.iws
-*.iml
-*.ipr
-
-### Eclipse ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-
-### NetBeans ###
-/nbproject/private/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
-build/
-!**/src/main/**/build/
-!**/src/test/**/build/
-
-### VS Code ###
-.vscode/
-
-### Mac OS ###
-.DS_Store
\ No newline at end of file
diff --git a/quarkus/addons/common/kogito-addons-quarkus-common-health/pom.xml
b/quarkus/addons/common/kogito-addons-quarkus-common-health/pom.xml
deleted file mode 100644
index 8e5520fb71..0000000000
--- a/quarkus/addons/common/kogito-addons-quarkus-common-health/pom.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<!--
- ~ 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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-common-parent</artifactId>
- <version>999-SNAPSHOT</version>
- </parent>
- <artifactId>kogito-addons-quarkus-common-health</artifactId>
- <name>kogito-addons-quarkus-common-health</name>
- <properties>
-
<java.module.name>org.kie.kogito.addons.quarkus.common.health</java.module.name>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.eclipse.microprofile.config</groupId>
- <artifactId>microprofile-config-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.microprofile.health</groupId>
- <artifactId>microprofile-health-api</artifactId>
- </dependency>
- <dependency>
- <groupId>io.smallrye.config</groupId>
- <artifactId>smallrye-config-core</artifactId>
- </dependency>
- <dependency>
- <groupId>io.smallrye.reactive</groupId>
- <artifactId>smallrye-mutiny-vertx-web-client</artifactId>
- </dependency>
- <!-- Testing dependencies -->
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-api</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-junit-jupiter</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-common-health/src/main/java/org/kie/kogito/addon/quarkus/common/config/AbstractAliasConfigSource.java
b/quarkus/addons/common/kogito-addons-quarkus-common-health/src/main/java/org/kie/kogito/addon/quarkus/common/config/AbstractAliasConfigSource.java
deleted file mode 100644
index 467519cba4..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-common-health/src/main/java/org/kie/kogito/addon/quarkus/common/config/AbstractAliasConfigSource.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.addon.quarkus.common.config;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.microprofile.config.spi.ConfigSource;
-
-public abstract class AbstractAliasConfigSource implements ConfigSource {
-
- protected int ordinal;
- protected String configValue;
- protected final Set<String> propertyNames = new HashSet<>();
-
- public AbstractAliasConfigSource(Set<String> propertyNames) {
- this.propertyNames.addAll(propertyNames);
- }
-
- public void setOrdinal(int ordinal) {
- this.ordinal = ordinal;
- }
-
- public void setConfigValue(String configValue) {
- this.configValue = configValue;
- }
-
- public abstract String getConfigAlias();
-
- @Override
- public Set<String> getPropertyNames() {
- return propertyNames;
- }
-
- @Override
- public String getValue(String propertyName) {
- return propertyNames.contains(propertyName) ? configValue : null;
- }
-}
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-common-health/src/main/java/org/kie/kogito/addon/quarkus/common/config/AbstractAliasConfigSourceFactory.java
b/quarkus/addons/common/kogito-addons-quarkus-common-health/src/main/java/org/kie/kogito/addon/quarkus/common/config/AbstractAliasConfigSourceFactory.java
deleted file mode 100644
index 7104c659af..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-common-health/src/main/java/org/kie/kogito/addon/quarkus/common/config/AbstractAliasConfigSourceFactory.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.addon.quarkus.common.config;
-
-import java.util.List;
-
-import org.eclipse.microprofile.config.spi.ConfigSource;
-
-import io.smallrye.config.ConfigSourceContext;
-import io.smallrye.config.ConfigSourceFactory;
-import io.smallrye.config.ConfigValue;
-
-public class AbstractAliasConfigSourceFactory<T extends
AbstractAliasConfigSource> implements ConfigSourceFactory {
-
- protected T configSource;
-
- public AbstractAliasConfigSourceFactory(T configSource) {
- this.configSource = configSource;
- }
-
- @Override
- public Iterable<ConfigSource> getConfigSources(ConfigSourceContext
context) {
- ConfigValue configValue =
context.getValue(configSource.getConfigAlias());
- String value = configValue.getValue();
- if (value == null || value.isEmpty()) {
- return List.of();
- } else {
- configSource.setConfigValue(value);
- configSource.setOrdinal(configValue.getSourceOrdinal());
- return List.of(configSource);
- }
- }
-}
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-common-health/src/main/java/org/kie/kogito/addon/quarkus/common/health/AbstractAvailabilityHealthCheck.java
b/quarkus/addons/common/kogito-addons-quarkus-common-health/src/main/java/org/kie/kogito/addon/quarkus/common/health/AbstractAvailabilityHealthCheck.java
deleted file mode 100644
index ca86f96e3b..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-common-health/src/main/java/org/kie/kogito/addon/quarkus/common/health/AbstractAvailabilityHealthCheck.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * 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.addon.quarkus.common.health;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.time.Duration;
-
-import org.eclipse.microprofile.health.HealthCheck;
-import org.eclipse.microprofile.health.HealthCheckResponse;
-import org.eclipse.microprofile.health.HealthCheckResponseBuilder;
-
-import io.vertx.core.http.HttpMethod;
-import io.vertx.core.json.JsonObject;
-import io.vertx.mutiny.core.Vertx;
-import io.vertx.mutiny.core.buffer.Buffer;
-import io.vertx.mutiny.ext.web.client.HttpResponse;
-import io.vertx.mutiny.ext.web.client.WebClient;
-
-public abstract class AbstractAvailabilityHealthCheck implements HealthCheck {
-
- private static final Duration DEFAULT_TIMEOUT = Duration.ofMillis(500);
- private static final int DEFAULT_PORT = 80;
-
- protected String serviceName;
-
- protected String serviceUrl;
-
- protected String healthPath;
-
- protected String checkType;
-
- protected Vertx vertx;
-
- protected WebClient webClient;
-
- protected Duration requestTimeout;
-
- public AbstractAvailabilityHealthCheck() {
- // CDI
- }
-
- public AbstractAvailabilityHealthCheck(String serviceName, String
serviceUrl, String healthPath, String checkType,
- Vertx vertx, Duration requestTimeout) {
- this.serviceName = serviceName;
- this.serviceUrl = serviceUrl;
- this.healthPath = healthPath;
- this.checkType = checkType;
- this.vertx = vertx;
- this.requestTimeout = requestTimeout != null ? requestTimeout :
DEFAULT_TIMEOUT;
- this.webClient = createClient();
- }
-
- /**
- * facilitates tests.
- */
- protected WebClient createClient() {
- return WebClient.create(vertx);
- }
-
- @Override
- public HealthCheckResponse call() {
- HealthCheckResponseBuilder builder =
HealthCheckResponse.named(serviceName + " Availability - " + checkType).up();
- if (serviceUrl == null) {
- builder.down().withData("error", serviceName + " url is not
configured");
- } else {
- URL url;
- try {
- url = new URL(serviceUrl);
- HttpResponse<Buffer> response =
webClient.request(HttpMethod.GET,
- url.getPort() > 0 ? url.getPort() : DEFAULT_PORT,
- url.getHost(),
- healthPath)
- .send()
- .await()
- .atMost(requestTimeout);
- if (response.statusCode() != 200) {
- String data = "[" + response.statusCode() + "] - " +
response.statusMessage();
- builder.down().withData("error", data);
- } else {
- JsonObject jsonResponse = response.bodyAsJsonObject();
- if (jsonResponse == null ||
!HealthCheckResponse.Status.UP.name().equals(jsonResponse.getString("status")))
{
- builder.down();
- }
- }
- } catch (Exception e) {
- if (e instanceof MalformedURLException) {
- builder.down().withData("error", serviceName + " url
configuration error: " + e.getMessage());
- } else {
- builder.down().withData("error", "[unknown] - " +
e.getMessage());
- }
- }
- }
- return builder.build();
- }
-}
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-common-health/src/test/java/org/kie/kogito/addon/quarkus/common/health/AbstractAvailabilityHealthCheckTest.java
b/quarkus/addons/common/kogito-addons-quarkus-common-health/src/test/java/org/kie/kogito/addon/quarkus/common/health/AbstractAvailabilityHealthCheckTest.java
deleted file mode 100644
index 86d3b98b27..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-common-health/src/test/java/org/kie/kogito/addon/quarkus/common/health/AbstractAvailabilityHealthCheckTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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.addon.quarkus.common.health;
-
-import org.eclipse.microprofile.health.HealthCheckResponse;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.Mock;
-import org.mockito.junit.jupiter.MockitoExtension;
-
-import io.smallrye.mutiny.Uni;
-import io.vertx.core.http.HttpMethod;
-import io.vertx.core.json.JsonObject;
-import io.vertx.mutiny.core.Vertx;
-import io.vertx.mutiny.core.buffer.Buffer;
-import io.vertx.mutiny.ext.web.client.HttpRequest;
-import io.vertx.mutiny.ext.web.client.HttpResponse;
-import io.vertx.mutiny.ext.web.client.WebClient;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.lenient;
-import static org.mockito.Mockito.mock;
-
-@ExtendWith(MockitoExtension.class)
-public abstract class AbstractAvailabilityHealthCheckTest {
-
- protected static final String HOST = "service-host";
- protected static final int PORT = 8080;
- protected static final String SERVICE_URL = "http://" + HOST + ":" + PORT;
- protected static final String HEALTH_PATH = "/q/health/ready";
- protected AbstractAvailabilityHealthCheck healthCheck;
- @Mock
- protected Vertx vertx;
- @Mock
- protected WebClient webClient;
-
- protected abstract AbstractAvailabilityHealthCheck
createHealthCheck(String serviceUrl, Vertx vertxMock, WebClient webClientMock);
-
- @Test
- void healthCheckUp() {
- healthCheck = createHealthCheck(SERVICE_URL, vertx, webClient);
- prepareCall(HOST, PORT, HEALTH_PATH, HealthCheckResponse.Status.UP,
false);
- HealthCheckResponse response = healthCheck.call();
-
assertThat(response.getStatus()).isEqualTo(HealthCheckResponse.Status.UP);
- }
-
- @Test
- void healthCheckDown() {
- healthCheck = createHealthCheck(SERVICE_URL, vertx, webClient);
- prepareCall(HOST, PORT, HEALTH_PATH, HealthCheckResponse.Status.DOWN,
false);
- HealthCheckResponse response = healthCheck.call();
-
assertThat(response.getStatus()).isEqualTo(HealthCheckResponse.Status.DOWN);
- }
-
- @Test
- void healthCheckDownServiceCallError() {
- healthCheck = createHealthCheck(SERVICE_URL, vertx, webClient);
- prepareCall(HOST, PORT, HEALTH_PATH, HealthCheckResponse.Status.UP,
true);
- HealthCheckResponse response = healthCheck.call();
-
assertThat(response.getStatus()).isEqualTo(HealthCheckResponse.Status.DOWN);
- assertThat(response.getData()).isPresent();
- Object error = response.getData().get().get("error");
- assertThat(error).isNotNull().hasToString("[500] - Internal server
error");
- }
-
- protected void prepareCall(String host, int port, String path,
HealthCheckResponse.Status responseStatus, boolean mockError) {
- HttpRequest<Buffer> requestMock = mock(HttpRequest.class);
- doReturn(requestMock).when(webClient).request(HttpMethod.GET, port,
host, path);
-
- HttpResponse<Buffer> httpResponse = mock(HttpResponse.class);
- JsonObject jsonObject = JsonObject.of("status", responseStatus.name());
- lenient().doReturn(jsonObject).when(httpResponse).bodyAsJsonObject();
- int statusCode = 200;
- if (mockError) {
- statusCode = 500;
- doReturn("Internal server
error").when(httpResponse).statusMessage();
- }
- doReturn(statusCode).when(httpResponse).statusCode();
- doReturn(Uni.createFrom().item(httpResponse)).when(requestMock).send();
- }
-}
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/.gitignore
b/quarkus/addons/common/kogito-addons-quarkus-data-index-health/.gitignore
deleted file mode 100644
index eef7c80055..0000000000
--- a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/.gitignore
+++ /dev/null
@@ -1,57 +0,0 @@
-###
-# 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.
-###
-
-target/
-!.mvn/wrapper/maven-wrapper.jar
-!**/src/main/**/target/
-!**/src/test/**/target/
-
-### IntelliJ IDEA ###
-.idea/modules.xml
-.idea/jarRepositories.xml
-.idea/compiler.xml
-.idea/libraries/
-*.iws
-*.iml
-*.ipr
-
-### Eclipse ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-
-### NetBeans ###
-/nbproject/private/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
-build/
-!**/src/main/**/build/
-!**/src/test/**/build/
-
-### VS Code ###
-.vscode/
-
-### Mac OS ###
-.DS_Store
\ No newline at end of file
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/pom.xml
b/quarkus/addons/common/kogito-addons-quarkus-data-index-health/pom.xml
deleted file mode 100644
index 88ad4996b5..0000000000
--- a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/pom.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<!--
- ~ 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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-common-parent</artifactId>
- <version>999-SNAPSHOT</version>
- </parent>
- <artifactId>kogito-addons-quarkus-data-index-health</artifactId>
- <name>kogito-addons-quarkus-data-index-health</name>
- <properties>
-
<java.module.name>org.kie.kogito.addons.quarkus.index.health</java.module.name>
- </properties>
- <dependencies>
- <dependency>
- <groupId>jakarta.enterprise</groupId>
- <artifactId>jakarta.enterprise.cdi-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.microprofile.health</groupId>
- <artifactId>microprofile-health-api</artifactId>
- </dependency>
- <dependency>
- <groupId>io.smallrye.reactive</groupId>
- <artifactId>smallrye-mutiny-vertx-web-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-common-health</artifactId>
- </dependency>
- <!-- Testing dependencies -->
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-smallrye-health</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-api</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-junit-jupiter</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-common-health</artifactId>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/java/org/kie/kogito/addon/quarkus/index/health/DataIndexAvailabilityHealthCheck.java
b/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/java/org/kie/kogito/addon/quarkus/index/health/DataIndexAvailabilityHealthCheck.java
deleted file mode 100644
index 1179f01d4c..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/java/org/kie/kogito/addon/quarkus/index/health/DataIndexAvailabilityHealthCheck.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.addon.quarkus.index.health;
-
-import java.time.Duration;
-import java.util.Optional;
-
-import org.eclipse.microprofile.config.inject.ConfigProperty;
-import org.eclipse.microprofile.health.Startup;
-import
org.kie.kogito.addon.quarkus.common.health.AbstractAvailabilityHealthCheck;
-
-import io.vertx.mutiny.core.Vertx;
-
-import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.inject.Inject;
-
-@Startup
-@ApplicationScoped
-public class DataIndexAvailabilityHealthCheck extends
AbstractAvailabilityHealthCheck {
-
- private static final String KOGITO_DATA_INDEX_URL =
"kogito.data-index.url";
-
- public static final String CONFIG_ALIAS =
"kogito.data-index.health-enabled";
-
- @Inject
- public DataIndexAvailabilityHealthCheck(@ConfigProperty(name =
KOGITO_DATA_INDEX_URL) Optional<String> dataIndexUrl,
- Vertx vertx) {
- super("Data Index", dataIndexUrl.orElse(null), "/q/health/ready",
"startup check", vertx, Duration.ofMillis(500));
- }
-}
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/java/org/kie/kogito/addon/quarkus/index/health/DataIndexAvailabilityHealthCheckConfigSource.java
b/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/java/org/kie/kogito/addon/quarkus/index/health/DataIndexAvailabilityHealthCheckConfigSource.java
deleted file mode 100644
index f9f6394cb6..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/java/org/kie/kogito/addon/quarkus/index/health/DataIndexAvailabilityHealthCheckConfigSource.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.addon.quarkus.index.health;
-
-import java.util.Set;
-
-import org.kie.kogito.addon.quarkus.common.config.AbstractAliasConfigSource;
-
-public class DataIndexAvailabilityHealthCheckConfigSource extends
AbstractAliasConfigSource {
-
- public DataIndexAvailabilityHealthCheckConfigSource() {
- super(Set.of(
- "io.smallrye.health.check." +
DataIndexAvailabilityHealthCheck.class.getName() + ".enabled",
- DataIndexAvailabilityHealthCheck.CONFIG_ALIAS));
- }
-
- @Override
- public String getConfigAlias() {
- return DataIndexAvailabilityHealthCheck.CONFIG_ALIAS;
- }
-
- @Override
- public String getName() {
- return
DataIndexAvailabilityHealthCheckConfigSource.class.getSimpleName();
- }
-}
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/java/org/kie/kogito/addon/quarkus/index/health/DataIndexAvailabilityHealthCheckConfigSourceFactory.java
b/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/java/org/kie/kogito/addon/quarkus/index/health/DataIndexAvailabilityHealthCheckConfigSourceFactory.java
deleted file mode 100644
index d3f451c3e0..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/java/org/kie/kogito/addon/quarkus/index/health/DataIndexAvailabilityHealthCheckConfigSourceFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.addon.quarkus.index.health;
-
-import
org.kie.kogito.addon.quarkus.common.config.AbstractAliasConfigSourceFactory;
-
-public class DataIndexAvailabilityHealthCheckConfigSourceFactory extends
AbstractAliasConfigSourceFactory<DataIndexAvailabilityHealthCheckConfigSource> {
-
- public DataIndexAvailabilityHealthCheckConfigSourceFactory() {
- super(new DataIndexAvailabilityHealthCheckConfigSource());
- }
-}
\ No newline at end of file
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/resources/META-INF/beans.xml
b/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/resources/META-INF/beans.xml
deleted file mode 100644
index a0eb9fbf8c..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/resources/META-INF/beans.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<!--
-
- 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/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/resources/META-INF/services/io.smallrye.config.ConfigSourceFactory
b/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/resources/META-INF/services/io.smallrye.config.ConfigSourceFactory
deleted file mode 100644
index 515aa0d508..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/main/resources/META-INF/services/io.smallrye.config.ConfigSourceFactory
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# 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.
-#
-
-org.kie.kogito.addon.quarkus.index.health.DataIndexAvailabilityHealthCheckConfigSourceFactory
\ No newline at end of file
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/test/java/org/kie/kogito/addon/quarkus/index/health/DataIndexServiceAvailabilityHealthCheckTest.java
b/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/test/java/org/kie/kogito/addon/quarkus/index/health/DataIndexServiceAvailabilityHealthCheckTest.java
deleted file mode 100644
index ebba81ebf5..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-data-index-health/src/test/java/org/kie/kogito/addon/quarkus/index/health/DataIndexServiceAvailabilityHealthCheckTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.addon.quarkus.index.health;
-
-import java.util.Optional;
-
-import
org.kie.kogito.addon.quarkus.common.health.AbstractAvailabilityHealthCheck;
-import
org.kie.kogito.addon.quarkus.common.health.AbstractAvailabilityHealthCheckTest;
-
-import io.vertx.mutiny.core.Vertx;
-import io.vertx.mutiny.ext.web.client.WebClient;
-
-class DataIndexServiceAvailabilityHealthCheckTest extends
AbstractAvailabilityHealthCheckTest {
- @Override
- protected AbstractAvailabilityHealthCheck createHealthCheck(String
serviceUrl, Vertx vertxMock, WebClient webClientMock) {
- return new DataIndexAvailabilityHealthCheck(Optional.of(serviceUrl),
vertxMock) {
- @Override
- public WebClient createClient() {
- return webClientMock;
- }
- };
- }
-}
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/.gitignore
b/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/.gitignore
deleted file mode 100644
index eef7c80055..0000000000
--- a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/.gitignore
+++ /dev/null
@@ -1,57 +0,0 @@
-###
-# 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.
-###
-
-target/
-!.mvn/wrapper/maven-wrapper.jar
-!**/src/main/**/target/
-!**/src/test/**/target/
-
-### IntelliJ IDEA ###
-.idea/modules.xml
-.idea/jarRepositories.xml
-.idea/compiler.xml
-.idea/libraries/
-*.iws
-*.iml
-*.ipr
-
-### Eclipse ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-
-### NetBeans ###
-/nbproject/private/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
-build/
-!**/src/main/**/build/
-!**/src/test/**/build/
-
-### VS Code ###
-.vscode/
-
-### Mac OS ###
-.DS_Store
\ No newline at end of file
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/pom.xml
b/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/pom.xml
deleted file mode 100644
index d628ee5fe2..0000000000
--- a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/pom.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<!--
- ~ 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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-common-parent</artifactId>
- <version>999-SNAPSHOT</version>
- </parent>
- <artifactId>kogito-addons-quarkus-jobs-service-health</artifactId>
- <name>kogito-addons-quarkus-jobs-service-health</name>
- <properties>
-
<java.module.name>org.kie.kogito.addons.quarkus.jobs.health</java.module.name>
- </properties>
- <dependencies>
- <dependency>
- <groupId>jakarta.enterprise</groupId>
- <artifactId>jakarta.enterprise.cdi-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.microprofile.health</groupId>
- <artifactId>microprofile-health-api</artifactId>
- </dependency>
- <dependency>
- <groupId>io.smallrye.reactive</groupId>
- <artifactId>smallrye-mutiny-vertx-web-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-common-health</artifactId>
- </dependency>
- <!-- Testing dependencies -->
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-smallrye-health</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-api</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-junit-jupiter</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-common-health</artifactId>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/java/org/kie/kogito/addon/quarkus/jobs/health/JobsServiceAvailabilityHealthCheck.java
b/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/java/org/kie/kogito/addon/quarkus/jobs/health/JobsServiceAvailabilityHealthCheck.java
deleted file mode 100644
index eb210811ed..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/java/org/kie/kogito/addon/quarkus/jobs/health/JobsServiceAvailabilityHealthCheck.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.addon.quarkus.jobs.health;
-
-import java.time.Duration;
-import java.util.Optional;
-
-import org.eclipse.microprofile.config.inject.ConfigProperty;
-import org.eclipse.microprofile.health.Startup;
-import
org.kie.kogito.addon.quarkus.common.health.AbstractAvailabilityHealthCheck;
-
-import io.vertx.mutiny.core.Vertx;
-
-import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.inject.Inject;
-
-@Startup
-@ApplicationScoped
-public class JobsServiceAvailabilityHealthCheck extends
AbstractAvailabilityHealthCheck {
-
- private static final String KOGITO_JOBS_SERVICE_URL =
"kogito.jobs-service.url";
-
- public static final String CONFIG_ALIAS =
"kogito.jobs-service.health-enabled";
-
- @Inject
- public JobsServiceAvailabilityHealthCheck(@ConfigProperty(name =
KOGITO_JOBS_SERVICE_URL) Optional<String> jobsServiceUrl,
- Vertx vertx) {
- super("Jobs Service", jobsServiceUrl.orElse(null), "/q/health/ready",
"startup check", vertx, Duration.ofMillis(500));
- }
-}
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/java/org/kie/kogito/addon/quarkus/jobs/health/JobsServiceAvailabilityHealthCheckConfigSource.java
b/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/java/org/kie/kogito/addon/quarkus/jobs/health/JobsServiceAvailabilityHealthCheckConfigSource.java
deleted file mode 100644
index d75e68a58d..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/java/org/kie/kogito/addon/quarkus/jobs/health/JobsServiceAvailabilityHealthCheckConfigSource.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.addon.quarkus.jobs.health;
-
-import java.util.Set;
-
-import org.kie.kogito.addon.quarkus.common.config.AbstractAliasConfigSource;
-
-public class JobsServiceAvailabilityHealthCheckConfigSource extends
AbstractAliasConfigSource {
-
- public JobsServiceAvailabilityHealthCheckConfigSource() {
- super(Set.of(
- "io.smallrye.health.check." +
JobsServiceAvailabilityHealthCheck.class.getName() + ".enabled",
- JobsServiceAvailabilityHealthCheck.CONFIG_ALIAS));
- }
-
- @Override
- public String getConfigAlias() {
- return JobsServiceAvailabilityHealthCheck.CONFIG_ALIAS;
- }
-
- @Override
- public String getName() {
- return
JobsServiceAvailabilityHealthCheckConfigSource.class.getSimpleName();
- }
-}
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/java/org/kie/kogito/addon/quarkus/jobs/health/JobsServiceAvailabilityHealthCheckConfigSourceFactory.java
b/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/java/org/kie/kogito/addon/quarkus/jobs/health/JobsServiceAvailabilityHealthCheckConfigSourceFactory.java
deleted file mode 100644
index daebd5ea55..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/java/org/kie/kogito/addon/quarkus/jobs/health/JobsServiceAvailabilityHealthCheckConfigSourceFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.addon.quarkus.jobs.health;
-
-import
org.kie.kogito.addon.quarkus.common.config.AbstractAliasConfigSourceFactory;
-
-public class JobsServiceAvailabilityHealthCheckConfigSourceFactory extends
AbstractAliasConfigSourceFactory<JobsServiceAvailabilityHealthCheckConfigSource>
{
-
- public JobsServiceAvailabilityHealthCheckConfigSourceFactory() {
- super(new JobsServiceAvailabilityHealthCheckConfigSource());
- }
-}
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/resources/META-INF/beans.xml
b/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/resources/META-INF/beans.xml
deleted file mode 100644
index a0eb9fbf8c..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/resources/META-INF/beans.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<!--
-
- 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/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/resources/META-INF/services/io.smallrye.config.ConfigSourceFactory
b/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/resources/META-INF/services/io.smallrye.config.ConfigSourceFactory
deleted file mode 100644
index 9a25fda4f9..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/main/resources/META-INF/services/io.smallrye.config.ConfigSourceFactory
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# 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.
-#
-
-org.kie.kogito.addon.quarkus.jobs.health.JobsServiceAvailabilityHealthCheckConfigSourceFactory
diff --git
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/test/java/org/kie/kogito/addon/quarkus/jobs/health/JobsServiceAvailabilityHealthCheckTest.java
b/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/test/java/org/kie/kogito/addon/quarkus/jobs/health/JobsServiceAvailabilityHealthCheckTest.java
deleted file mode 100644
index 7ac3d8cf75..0000000000
---
a/quarkus/addons/common/kogito-addons-quarkus-jobs-service-health/src/test/java/org/kie/kogito/addon/quarkus/jobs/health/JobsServiceAvailabilityHealthCheckTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.addon.quarkus.jobs.health;
-
-import java.util.Optional;
-
-import
org.kie.kogito.addon.quarkus.common.health.AbstractAvailabilityHealthCheck;
-import
org.kie.kogito.addon.quarkus.common.health.AbstractAvailabilityHealthCheckTest;
-
-import io.vertx.mutiny.core.Vertx;
-import io.vertx.mutiny.ext.web.client.WebClient;
-
-class JobsServiceAvailabilityHealthCheckTest extends
AbstractAvailabilityHealthCheckTest {
- @Override
- protected AbstractAvailabilityHealthCheck createHealthCheck(String
serviceUrl, Vertx vertxMock, WebClient webClientMock) {
- return new JobsServiceAvailabilityHealthCheck(Optional.of(serviceUrl),
vertxMock) {
- @Override
- public WebClient createClient() {
- return webClientMock;
- }
- };
- }
-}
diff --git a/quarkus/addons/common/pom.xml b/quarkus/addons/common/pom.xml
index 0af269c4af..24200ed798 100644
--- a/quarkus/addons/common/pom.xml
+++ b/quarkus/addons/common/pom.xml
@@ -37,9 +37,6 @@
<modules>
<module>deployment</module>
<module>reactive-messaging</module>
- <module>kogito-addons-quarkus-common-health</module>
- <module>kogito-addons-quarkus-data-index-health</module>
- <module>kogito-addons-quarkus-jobs-service-health</module>
</modules>
-</project>
\ No newline at end of file
+</project>
diff --git a/quarkus/addons/jobs/knative-eventing/runtime/pom.xml
b/quarkus/addons/jobs/knative-eventing/runtime/pom.xml
index 9d64fd2d2b..020668a6eb 100644
--- a/quarkus/addons/jobs/knative-eventing/runtime/pom.xml
+++ b/quarkus/addons/jobs/knative-eventing/runtime/pom.xml
@@ -73,10 +73,6 @@
<groupId>org.kie</groupId>
<artifactId>kogito-addons-quarkus-rest-callback</artifactId>
</dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-jobs-service-health</artifactId>
- </dependency>
<!-- Test dependencies -->
<dependency>
<groupId>org.mockito</groupId>
diff --git a/quarkus/addons/knative/eventing/runtime/pom.xml
b/quarkus/addons/knative/eventing/runtime/pom.xml
index 1e8233ccd6..b8adbd641e 100644
--- a/quarkus/addons/knative/eventing/runtime/pom.xml
+++ b/quarkus/addons/knative/eventing/runtime/pom.xml
@@ -50,16 +50,6 @@
<groupId>io.quarkiverse.reactivemessaging.http</groupId>
<artifactId>quarkus-reactive-messaging-http</artifactId>
</dependency>
- <!-- must be optional, see:
https://quarkus.io/guides/writing-extensions#extension-health-check -->
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-smallrye-health</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kogito-addons-quarkus-data-index-health</artifactId>
- </dependency>
<!-- Testing dependencies -->
<dependency>
<groupId>io.quarkus</groupId>
diff --git a/quarkus/addons/source-files/runtime/pom.xml
b/quarkus/addons/source-files/runtime/pom.xml
index fa8a1dce14..24d5c00732 100644
--- a/quarkus/addons/source-files/runtime/pom.xml
+++ b/quarkus/addons/source-files/runtime/pom.xml
@@ -82,8 +82,11 @@
<artifactId>efesto-dependencies</artifactId>
</dependency>
-
- <!-- Test -->
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-quarkus-common</artifactId>
+ </dependency>
+ <!-- Test -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
diff --git
a/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common-deployment/pom.xml
b/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common-deployment/pom.xml
index a0879ba386..05f984341f 100644
---
a/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common-deployment/pom.xml
+++
b/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common-deployment/pom.xml
@@ -99,6 +99,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vertx-http-deployment-spi</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-smallrye-health-deployment</artifactId>
+ </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-deployment</artifactId>
diff --git
a/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common/pom.xml
b/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common/pom.xml
index fdcb577762..157f57a7ea 100644
---
a/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common/pom.xml
+++
b/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common/pom.xml
@@ -20,8 +20,8 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 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>kogito-quarkus-extension-common</artifactId>
<groupId>org.kie.kogito</groupId>
@@ -32,9 +32,9 @@
<artifactId>kogito-quarkus-common</artifactId>
<name>Kogito :: Quarkus Extension Common :: Runtime</name>
- <properties>
- <java.module.name>org.kie.kogito.quarkus.common</java.module.name>
- </properties>
+ <properties>
+ <java.module.name>org.kie.kogito.quarkus.common</java.module.name>
+ </properties>
<dependencies>
<dependency>
@@ -62,6 +62,10 @@
</dependency>
<!-- quarkus -->
+ <dependency>
+ <groupId>jakarta.annotation</groupId>
+ <artifactId>jakarta.annotation-api</artifactId>
+ </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-core</artifactId>
@@ -82,17 +86,17 @@
<groupId>io.quarkus.arc</groupId>
<artifactId>arc-processor</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-smallrye-health</artifactId>
+ </dependency>
+
<!-- kogito -->
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-api</artifactId>
</dependency>
-
- <dependency>
- <groupId>jakarta.annotation</groupId>
- <artifactId>jakarta.annotation-api</artifactId>
- </dependency>
</dependencies>
<build>
diff --git
a/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common/src/main/java/org/kie/kogito/quarkus/health/QuarkusProcessesLivenessHealthCheck.java
b/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common/src/main/java/org/kie/kogito/quarkus/health/QuarkusProcessesLivenessHealthCheck.java
new file mode 100644
index 0000000000..de03b5a9b5
--- /dev/null
+++
b/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common/src/main/java/org/kie/kogito/quarkus/health/QuarkusProcessesLivenessHealthCheck.java
@@ -0,0 +1,52 @@
+/*
+ * 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.quarkus.health;
+
+import org.eclipse.microprofile.health.HealthCheck;
+import org.eclipse.microprofile.health.HealthCheckResponse;
+import org.eclipse.microprofile.health.HealthCheckResponseBuilder;
+import org.eclipse.microprofile.health.Readiness;
+import org.kie.kogito.process.Processes;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.inject.Instance;
+import jakarta.inject.Inject;
+
+@Readiness
+@ApplicationScoped
+public class QuarkusProcessesLivenessHealthCheck implements HealthCheck {
+
+ @Inject
+ Instance<Processes> processes;
+
+ @Override
+ public HealthCheckResponse call() {
+ HealthCheckResponseBuilder reponse =
HealthCheckResponse.builder().name("Processes").up();
+
+ if (processes.isResolvable()) {
+ for (String processId : processes.get().processIds()) {
+ org.kie.kogito.process.Process<?> process =
processes.get().processById(processId);
+ reponse.withData(processId, process.version());
+ }
+ }
+
+ return reponse.build();
+ }
+
+}
diff --git
a/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common/src/main/java/org/kie/kogito/quarkus/health/QuarkusProcessesReadinessHealthCheck.java
b/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common/src/main/java/org/kie/kogito/quarkus/health/QuarkusProcessesReadinessHealthCheck.java
new file mode 100644
index 0000000000..efd212e38a
--- /dev/null
+++
b/quarkus/extensions/kogito-quarkus-extension-common/kogito-quarkus-common/src/main/java/org/kie/kogito/quarkus/health/QuarkusProcessesReadinessHealthCheck.java
@@ -0,0 +1,52 @@
+/*
+ * 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.quarkus.health;
+
+import org.eclipse.microprofile.health.HealthCheck;
+import org.eclipse.microprofile.health.HealthCheckResponse;
+import org.eclipse.microprofile.health.HealthCheckResponseBuilder;
+import org.eclipse.microprofile.health.Liveness;
+import org.kie.kogito.process.Processes;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.inject.Instance;
+import jakarta.inject.Inject;
+
+@Liveness
+@ApplicationScoped
+public class QuarkusProcessesReadinessHealthCheck implements HealthCheck {
+
+ @Inject
+ Instance<Processes> processes;
+
+ @Override
+ public HealthCheckResponse call() {
+ HealthCheckResponseBuilder reponse =
HealthCheckResponse.builder().name("Processes").up();
+
+ if (processes.isResolvable()) {
+ for (String processId : processes.get().processIds()) {
+ org.kie.kogito.process.Process<?> process =
processes.get().processById(processId);
+ reponse.withData(processId, process.version());
+ }
+ }
+
+ return reponse.build();
+ }
+
+}
diff --git
a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-extension-live-reload-test/src/test/java/org/kie/kogito/quarkus/serverless/workflow/deployment/livereload/LiveReloadProcessorTest.java
b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-extension-live-reload-test/src/test/java/org/kie/kogito/quarkus/serverless/workflow/deployment/livereload/LiveReloadProcessorTest.java
index ad7a9d09ba..0ea4e89ff3 100644
---
a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-extension-live-reload-test/src/test/java/org/kie/kogito/quarkus/serverless/workflow/deployment/livereload/LiveReloadProcessorTest.java
+++
b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-extension-live-reload-test/src/test/java/org/kie/kogito/quarkus/serverless/workflow/deployment/livereload/LiveReloadProcessorTest.java
@@ -95,7 +95,8 @@ public class LiveReloadProcessorTest {
"quarkus.grpc.server.port=" + PORT,
"quarkus.grpc.server.test-port=" + PORT,
"quarkus.devservices.enabled=false",
- "quarkus.smallrye-openapi.management.enabled=true")
+ "quarkus.smallrye-openapi.management.enabled=true",
+ "quarkus.smallrye-health.management.enabled=true")
.collect(Collectors.joining(System.lineSeparator()));
}
diff --git a/springboot/bom/pom.xml b/springboot/bom/pom.xml
index 37c1d218ac..613fc8ee38 100644
--- a/springboot/bom/pom.xml
+++ b/springboot/bom/pom.xml
@@ -81,6 +81,16 @@
<artifactId>swagger-annotations</artifactId>
<version>${version.io.swagger.core.v3}</version>
</dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-actuator-autoconfigure</artifactId>
+ <version>${version.org.springframework.boot}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-actuator</artifactId>
+ <version>${version.org.springframework.boot}</version>
+ </dependency>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
diff --git a/springboot/starters/kogito-processes-spring-boot-starter/pom.xml
b/springboot/starters/kogito-processes-spring-boot-starter/pom.xml
index 637e0f6f9c..996d79e487 100644
--- a/springboot/starters/kogito-processes-spring-boot-starter/pom.xml
+++ b/springboot/starters/kogito-processes-spring-boot-starter/pom.xml
@@ -44,6 +44,10 @@
<artifactId>jbpm-deps-group-bpmn2-compiler</artifactId>
<type>pom</type>
</dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-actuator-autoconfigure</artifactId>
+ </dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-rest-workitem</artifactId>
diff --git
a/springboot/starters/kogito-processes-spring-boot-starter/src/main/java/org/kie/kogito/process/ProcessesHealthIndicator.java
b/springboot/starters/kogito-processes-spring-boot-starter/src/main/java/org/kie/kogito/process/ProcessesHealthIndicator.java
new file mode 100644
index 0000000000..9a4a5248f5
--- /dev/null
+++
b/springboot/starters/kogito-processes-spring-boot-starter/src/main/java/org/kie/kogito/process/ProcessesHealthIndicator.java
@@ -0,0 +1,47 @@
+/*
+ * 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.process;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.actuate.health.Health;
+import org.springframework.boot.actuate.health.HealthIndicator;
+import org.springframework.stereotype.Component;
+
+@Component
+public class ProcessesHealthIndicator implements HealthIndicator {
+
+ @Autowired
+ protected Processes processes;
+
+ @Override
+ public Health health() {
+ Health.Builder builder = new Health.Builder().up();
+ Map<String, Object> details = new HashMap<>();
+ for (String processId : processes.processIds()) {
+ org.kie.kogito.process.Process<?> process =
processes.processById(processId);
+ details.put(processId, process.version());
+ }
+ builder.withDetails(details);
+ return builder.build();
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]