Data Index as a Quarkus Development service

SonataFlow main Quarkus extension
<dependency>
  <groupId>org.kie.kogito</groupId>
  <artifactId>kogito-quarkus</artifactId>
</dependency>
SonataFlow Quarkus extension
<dependency>
  <groupId>org.kie.kogito</groupId>
  <artifactId>kogito-quarkus-serverless-workflow</artifactId>
</dependency>

When you start your Quarkus project in development mode, an in-memory instance of the Data Index service is automatically started in the background. This feature is enabled by Quarkus Dev Services, and leverages Testcontainers to start an image of the Data Index service.

The SonataFlow Process Quarkus extension sets up your Quarkus application to automatically replicate any SonataFlow messaging events related to workflow instances or jobs into the provisioned Data Index instance.

Once the service is up and running, you can query the GraphQL interface directly using http://localhost:8180/graphql or using the Quarkus Dev UI console http://localhost:8080/q/dev.

The Data Index GraphQL endpoint can query for ProcessInstances and Jobs. For more information about operations and attributes to query, see GraphQL endpoint provided by Data Index section.

You can share the same Data Index instance across multiple SonataFlow services during development. Sharing Data Index instances is enabled by default, therefore, only one Data Index instance is started. This behavior can be adjusted to start multiple instances using the quarkus.kogito.devservices.shared property.

The Quarkus Dev Service also allows further configuration options including:

  • To disable Data Index Dev Service, use the quarkus.kogito.devservices.enabled=false property.

  • To change the port where the Data Index Dev Service runs, use the quarkus.kogito.devservices.port=8180 property.

  • To adjust the provisioned image, use quarkus.kogito.devservices.imageName=quay.io/kiegroup/kogito-data-index-ephemeral property.

  • To disable sharing the Data Index instance across multiple Quarkus applications, use quarkus.kogito.devservices.shared=false property.

For more information about Quarkus Dev Services, see Dev Services guide.

Data Index service configuration properties

The following table serves as a quick reference for commonly Data Index configuration properties supported.

Table 1. Common configuration properties
Property Description Type Default value Override at runtime

QUARKUS_DATASOURCE_JDBC_URL

The datasource URL

string

Yes

QUARKUS_DATASOURCE_USERNAME

The datasource username

string

Yes

QUARKUS_DATASOURCE_PASSWORD

The datasource password

string

Yes

QUARKUS_DATASOURCE_DB_KIND

The kind of database to connect: postgresql, …​

string

Yes

QUARKUS_FLYWAY_MIGRATE_AT_START

true to execute Flyway automatically when the application starts, false otherwise.

boolean

false

Yes

KOGITO_DATA_INDEX_QUARKUS_PROFILE

(Only when referencing an image distribution)

Allows to change the event connection type. The possible values are:

  • kafka-events-support

  • http-events-support

string

kafka-events-support

Yes

kogito.persistence.query.timeout.millis

Defines timeout for a query execution.

long

10000

Yes

quarkus.kogito.devservices.enabled

Enables or disables the Dev Services for workflows. By default, the Dev Services are enabled, unless an existing configuration is present.

boolean

true

No

quarkus.kogito.devservices.port

Defines the optional fixed port that the Dev Services listen to.

int

8180

No

quarkus.kogito.devservices.image-name

Defines the Data Index image to use in Dev Service.

string

quay.io/kiegroup/kogito-data-index-ephemeral:main

No

quarkus.kogito.devservices.shared

Indicates if the Data Index instance, which is managed by Quarkus Dev Services, is shared.

boolean

true

No

quarkus.kogito.devservices.service-name

Defines the value of the label that is attached to the started container. This property is used when shared is set to true.

string

kogito-data-index

No


Found an issue?

If you find an issue or any misleading information, please feel free to report it here. We really appreciate it!