GithubHelp home page GithubHelp logo

apache / incubator-kie-kogito-apps Goto Github PK

View Code? Open in Web Editor NEW
57.0 57.0 125.0 76.19 MB

Kogito Apps - Kogito is a cloud-native business automation technology for building cloud-ready business applications.

Home Page: http://kogito.kie.org

License: Apache License 2.0

HTML 0.23% Shell 0.10% Java 99.27% Groovy 0.31% Makefile 0.09%
bpm bpmn cloud-native cmmn dmn hacktoberfest java knative kogito react rules-engine serverless-workflow spring-boot trustyai typescript workflow workflow-engine

incubator-kie-kogito-apps's Introduction

Kogito Apps

Contributing to Kogito

All contributions are welcome! Before you start please read the contribution guide.

Building from source

  • Check out the source:
git clone [email protected]:kiegroup/kogito-apps.git

If you don't have a GitHub account use this command instead:

git clone https://github.com/kiegroup/kogito-apps.git

Getting Help

Issues

  • Do you have a minimal, reproducible example for your issue?
    • If so, please open a Jira for it in the Kogito project with the details of your issue and example.
  • Are you encountering an issue but unsure of what is going on?
    • Start a new conversation in the Kogito Google Group, or open a new thread in the Kogito stream of the KIE Zulip chat.
    • Please provide as much relevant information as you can as to what could be causing the issue, and our developers will help you figure out what's going wrong.

Requests

  • Do you have a feature/enhancement request?
    • Please open a new thread in the Kogito stream of the KIE Zulip chat to start a discussion there.

incubator-kie-kogito-apps's People

Contributors

ajayjagan avatar bsig-gh-bot avatar bxf12315 avatar cristianonicolai avatar danielezonca avatar dependabot[bot] avatar elguardian avatar evacchi avatar fjtirado avatar ginxo avatar gitgabrio avatar jstastny-cz avatar kelvah avatar manstis avatar mbiarnes avatar nmirasch avatar paulovmr avatar pefernan avatar r00ta avatar radtriste avatar ricardozanini avatar robgeada avatar ruivieira avatar sara4994 avatar sgitario avatar srambach avatar tarilabs avatar tiagodolphine avatar tteofili avatar wmedvede avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

incubator-kie-kogito-apps's Issues

Enable visualizing processes/workflows instances in deployment environment

Description

Enable visualizing processes/workflows instances in deployment environment.

There is no clear and easy way how to visualize processes/workflows instances when you deploy your project to cluster (for example minikube). Dev UI is available only in a local quarkus dev mode. It would be very helpful to do it via UI.

Implementation ideas

No response

Data index do not register array for repeated proto object

Describe the bug

As per kogito docs it supports
Java object with list of Java object.
When proto is generated it generate correctly list as repeated object.
In data index however it does not create schema as array and register scham witht he object only. Advice on this.

Expected behavior

If a variable is
Public class Samples{ private List<Sample> smp; }

The the data index should register smp as a array

Actual behavior

Only single sample object is created in schema.

How to Reproduce?

Try a simple variable with list of Java object inside and try registering in data index.

Output of uname -a or ver

Mac mini arm chipset

Output of java -version

Graal vm 22

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

1.20.0.Final

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

Need to register the list if proto have repeated value.

Management console not working while using kogito-data-index-postgresql

Hi,

I have a project working with data-index using postgresql but I'm having trouble getting the management console running, every time I try to see which processes are running, in the management console, I get this errror:
Screenshot_1
In data-index it returns something when I try to do a query, I already initialized the tables present here: https://github.com/kiegroup/kogito-apps/blob/main/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/data_index_create.sql in the postgres database running on docker
Screenshot_2
Here is a copy of my docker-compose:

version: '2.1'

services:

postgres:
image: "postgres"
ports:
- "5432:5432"
volumes:
- ./postgres/initialize-databases.sql:/docker-entrypoint-initdb.d/initialize-databases.sql
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres

zookeeper:
container_name: zookeeper
image: strimzi/kafka:0.20.1-kafka-2.6.0
command: [
"sh", "-c",
"bin/zookeeper-server-start.sh config/zookeeper.properties"
]
ports:
- "2181:2181"
environment:
LOG_DIR: "/tmp/logs"

kafka:
image: strimzi/kafka:0.20.1-kafka-2.6.0
container_name: kafka
command: [
"sh", "-c",
"bin/kafka-server-start.sh config/server.properties --override inter.broker.listener.name=$${KAFKA_INTER_BROKER_LISTENER_NAME} --override listener.security.protocol.map=$${KAFKA_LISTENER_SECURITY_PROTOCOL_MAP} --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}"
]
depends_on:
- zookeeper
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 0
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://kafka:9092
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
LOG_DIR: "/tmp/logs"

prometheus:
image: prom/prometheus:v2.8.0
container_name: prometheus
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:z
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9090:9090

grafana:
image: grafana/grafana:6.6.1
container_name: grafana
depends_on:
- prometheus
ports:
- 3000:3000
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/:z
environment:
- PROMETHEUS_URL=http://prometheus:9090

keycloak:
container_name: keycloak
image: quay.io/keycloak/keycloak:15.0.2
ports:
- "8480:8080"
volumes:
- ./keycloak/kogito-realm.json:/tmp/kogito-realm.json
environment:
DB_VENDOR: POSTGRES
DB_ADDR: postgres
DB_DATABASE: postgres
DB_USER: postgres
DB_SCHEMA: public
DB_PASSWORD: postgres
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
KEYCLOAK_IMPORT: /tmp/kogito-realm.json

data-index:
container_name: data-index
image: quay.io/kiegroup/kogito-data-index-postgresql:${KOGITO_VERSION}
ports:
- "8180:8080"
depends_on:
kafka:
condition: service_started
volumes:
- ./target/protobuf:/home/kogito/data/protobufs/
environment:
QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://postgres:5432/postgres"
QUARKUS_DATASOURCE_USERNAME: postgres
QUARKUS_DATASOURCE_PASSWORD: postgres
KAFKA_BOOTSTRAP_SERVERS: kafka:29092

management-console:
container_name: management-console
image: quay.io/kiegroup/kogito-management-console:${KOGITO_VERSION}
ports:
- 8280:8080
depends_on:
- data-index
volumes:
- ./svg/:/home/kogito/data/svg/
environment:
KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST}:8180
KOGITO_MANAGEMENT_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://${DOCKER_GATEWAY_HOST}:8480/auth -Dkogito.consoles.keycloak.config.health-check-url=http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration -Dkogito.svg.folder.path=/home/kogito/data/svg
SCRIPT_DEBUG: "true"

Not sure what is leading the management-console to fail or what should I do to fix it. Here is a link to the public repository where I have that docker-compose:
https://github.com/diogomvasconcelos/management-console-debug

Best Regards
Diogo

Parent Child Process - Child process not in data index

Describe the bug

Referred in Jira KOGITO-8852
Hi Team,
I am trying to use reuseable subprocess. So SampleParent calls SampleChild.
Only sample variables of Boolean type a and b added for testing.
When the same is triggered no SampleChild is persisted in SampleChild_domain collection.
Need to know what am I doing wrong in this.
Or if this is a bug to fix in data index.
PARENT PROCESS SAMPLE
Screenshot 2023-03-14 at 8 02 48 AM
CHILD PROCESS SAMPLE
Screenshot 2023-03-14 at 8 03 12 AM
Logs

Starting workflow 'sampleParent' (83c96e1e-46aa-4003-8da5-9d2e10b62054)

2023-03-14 08:06:41,560 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'a' value: 'true'
2023-03-14 08:06:41,560 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'b' value: 'true'
2023-03-14 08:06:41,560 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Triggered node 'Start' for process 'sampleParent' (83c96e1e-46aa-4003-8da5-9d2e10b62054)
2023-03-14 08:06:41,560 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Triggered node 'Sub-process' for process 'sampleParent' (83c96e1e-46aa-4003-8da5-9d2e10b62054)
2023-03-14 08:06:41,625 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Starting workflow 'sampleChild' (82c565dc-2201-4ed3-8596-e3e37bd9546e)
2023-03-14 08:06:41,625 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'a' value: 'true'
2023-03-14 08:06:41,625 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'b' value: 'true'
2023-03-14 08:06:41,626 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Triggered node 'Start' for process 'sampleChild' (82c565dc-2201-4ed3-8596-e3e37bd9546e)
2023-03-14 08:06:41,626 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Triggered node 'End' for process 'sampleChild' (82c565dc-2201-4ed3-8596-e3e37bd9546e)
2023-03-14 08:06:41,626 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Workflow 'sampleChild' (82c565dc-2201-4ed3-8596-e3e37bd9546e) completed
2023-03-14 08:06:41,659 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'a' changed value from: 'true', to: 'true'
2023-03-14 08:06:41,659 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'b' changed value from: 'true', to: 'true'
2023-03-14 08:06:41,659 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'a' changed value from: 'true', to: 'true'
2023-03-14 08:06:41,659 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'b' changed value from: 'true', to: 'true'
2023-03-14 08:06:41,659 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Triggered node 'End' for process 'sampleParent' (83c96e1e-46aa-4003-8da5-9d2e10b62054)
2023-03-14 08:06:41,663 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Workflow 'sampleParent' (83c96e1e-46aa-4003-8da5-9d2e10b62054) completed 

I can clearly see the same in runtime engine that both Child and Parent process completed.
in processinstances collection both processes are captured.
Screenshot 2023-03-14 at 8 11 04 AM

Expected behavior

both sampleParent and sampleChild to be in dataindex if its spin off from the withing sampleParent then parentprocessinstanceid to be populated with the value.

Actual behavior

child is not persisted in domain.

How to Reproduce?

No response

Output of uname -a or ver

Darwin Mac-mini.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:04:44 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8103 arm64

Output of java -version

openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

1.35.0.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /opt/apache-maven-3.8.6 Java version: 19.0.1, vendor: GraalVM Community, runtime: /Library/Java/JavaVirtualMachines/graalvm-ce-java19-22.3.0/Contents/Home Default locale: en_IN, platform encoding: UTF-8 OS name: "mac os x", version: "13.1", arch: "aarch64", family: "mac"

Additional information

No response

Process Definition storage fails if version is not set

Describe the bug

If version is not set in the workflow definition, indexProcesDefinition throw an IndexOutOfBound exception.
This is wrong, since version is optional in the specification https://github.com/serverlessworkflow/specification/blob/main/specification.md#workflow-definition-structure.

Expected behavior

Workflow without version should be supported without exception

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

custom graphql shema is not working with data-index

Description

Description

Hi Team,

We have implemented with custom graphql API on data index but it is not reflecting with data-index graphql playground(/graphql)
we have added graphql-client as dependency .
Could you please guide us,How can we implement custom graphql API.

Implementation ideas

No response

Unsatisfied dependency on running unit tests

Describe the bug

The kogito project is implemented with kotlin and gradle and quarkus.
The project same as java project with maven, and it running perfectly. But with kotlin and gradle has Unsatisfied dependency issue.
When I'm running with this command ./gradlew quarkusTest, I got this error:
: java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: Found 2 deployment problems: [1] Ambiguous dependencies for type org.kie.kogito.process.Process<? extends org.kie.kogito.Model> and qualifiers [@Default] - java member: org.acme.travel.BookHotelTest#bookHotelProcess - declared on CLASS bean [types=[org.acme.travel.BookHotelTest, java.lang.Object], qualifiers=[@Default, @Any], target=org.acme.travel.BookHotelTest] - available beans: - CLASS bean [types=[org.kie.kogito.process.impl.AbstractProcess<org.acme.travels.TravelsModel>, org.jbpm.process.core.ProcessSupplier, java.util.function.Supplier<org.kie.api.definition.process.Process>, java.lang.Object, org.acme.travels.TravelsProcess, org.kie.kogito.process.Process<org.acme.travels.TravelsModel>], qualifiers=[@Named("travels"), @Default, @Any], target=org.acme.travels.TravelsProcess] - CLASS bean [types=[org.kie.kogito.process.impl.AbstractProcess<org.acme.travels.HotelBookingModel>, org.jbpm.process.core.ProcessSupplier, java.util.function.Supplier<org.kie.api.definition.process.Process>, org.kie.kogito.process.Process<org.acme.travels.HotelBookingModel>, java.lang.Object, org.acme.travels.HotelBookingProcess], qualifiers=[@Named("hotelBooking"), @Default, @Any], target=org.acme.travels.HotelBookingProcess] - CLASS bean [types=[org.acme.travels.FlightBookingProcess, org.kie.kogito.process.impl.AbstractProcess<org.acme.travels.FlightBookingModel>, org.jbpm.process.core.ProcessSupplier, java.util.function.Supplier<org.kie.api.definition.process.Process>, org.kie.kogito.process.Process<org.acme.travels.FlightBookingModel>, java.lang.Object], qualifiers=[@Named("flightBooking"), @Default, @Any], target=org.acme.travels.FlightBookingProcess] [2] Ambiguous dependencies for type org.kie.kogito.process.Process<? extends org.kie.kogito.Model> and qualifiers [@Default] - java member: org.acme.travel.BookFlightTest#bookFlightProcess - declared on CLASS bean [types=[org.acme.travel.BookFlightTest, java.lang.Object], qualifiers=[@Default, @Any], target=org.acme.travel.BookFlightTest] - available beans:
When I'm running with intelij debugger, I got this error:
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: Found 2 deployment problems: [1] Unsatisfied dependency for type org.kie.kogito.process.Process<? extends org.kie.kogito.Model> and qualifiers [@Default] - java member: org.acme.travel.BookFlightTest#bookFlightProcess - declared on CLASS bean [types=[org.acme.travel.BookFlightTest, java.lang.Object], qualifiers=[@Default, @Any], target=org.acme.travel.BookFlightTest] [2] Unsatisfied dependency for type org.kie.kogito.process.Process<? extends org.kie.kogito.Model> and qualifiers [@Default] - java member: org.acme.travel.BookHotelTest#bookHotelProcess - declared on CLASS bean [types=[org.acme.travel.BookHotelTest, java.lang.Object], qualifiers=[@Default, @Any], target=org.acme.travel.BookHotelTest]

Expected behavior

Expect that test are running successfully.

Actual behavior

No response

How to Reproduce?

In the root of the project: run this command:
./gradlew quarkusTest
Or just run tests.

Output of uname -a or ver

No response

Output of java -version

17

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

1.33.0

Build tool (ie. output of mvnw --version or gradlew --version)

gradlew 7.5.1

Additional information

I'm runnign with kogito 1.35.0 as well, and I got same error.
Quarkus version: 2.16.4
kogito-gradle-issue.zip

Build the Quarkus app zips required by the images

Description

Currently the quarkus app zips required by images in [1] are built as part of the kogito-images repository using a script, where it basically fetches the apache/incubator-kie-kogito-apps repository from a branch/tag and build the required zips of each image before building the image.

The idea of this enhancement is to generate the quarkus app zips once and then change the kogito-images code to reuse already built artifacts.

[1] kogito-management-console / kogito-task-console / kogito-data-index-ephemeral / kogito-data-index-postgresql / kogito-jobs-service-ephemeral / kogito-jobs-service-postgresql / kogito-jit-runner

task-console quarkus.kogito-runtime-tools.users

Describe the bug

I'd install quarkus.kogito-runtime-tools.users, and configured the user list however only admin shown:

Screenshot 2022-12-06 at 2 07 54 PM

[edit] Plenty of javascript error:
Screenshot 2022-12-06 at 2 42 30 PM

application.properties defined list of users but not detected:

quarkus.kogito-runtime-tools.users=jdoe,user,admin
quarkus.kogito-runtime-tools.users.jdoe.groups=admin
quarkus.kogito-runtime-tools.users.admin.groups=admin
quarkus.kogito-runtime-tools.users.user.groups=user

Expected behavior

by right drop down should show 3 users "jdoe,user,admin"

Actual behavior

only admin shown

How to Reproduce?

  1. install runtime-tools-quarkus-extension: run cli: quarkus extension add runtime-tools-quarkus-extension
  2. run quarkus dev
  3. browse to http://localhost:8080/q/dev/org.kie.kogito.runtime-tools-quarkus-extension/tasks

Output of uname -a or ver

Darwin kstans-MacBook-Pro.local 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 x86_64

Output of java -version

openjdk 19.0.1 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08, mixed mode, sharing)

GraalVM version (if different from Java)

openjdk 19.0.1 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08, mixed mode, sharing)

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

powered by Quarkus 2.14.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)

Additional information

No response

Data index persistence addon fails when starting with a postgres database where another dataindex have been installed

Describe the bug

Dataindex Postgres migration scripts doesn't support several executions over the same database without any error.
Those scripts need to be fixed to allow multiple executions and just ensure the database definitions are what are needed

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

InvalidSchemaException when registered a proto which has only one variable in the message.

Describe the bug

in kogito bpmn, I added a process variable (for example "travels" variable) of type Java class(which has only one variable of type List)
when I register the kogito generated proto in dataindex and try to run the application, I get InvalidSchemaException exception.

This exception goes away when I add more variable in the Java class along with List type variable.
But as per our requirement we want only one variable in that java class.

Expected behavior

data index should start without any exception.

Actual behavior

Data index start up is failing because of InvalidSchemaException: TravelsOrderBy must define one or more field.

How to Reproduce?

  1. Create a Java class with one variable.
    public class Travels{
    private List travels;
    }
    public class Travel{
    private String travelId;
    }

  2. Add a process variable in bpmn of type Travels class

  3. generate proto and register it in data index.
    Sample:
    /Indexed/
    message Travels{
    options java_package = "some package";
    repeated Travel travels = 1;
    }

  4. Start the application

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

Since List datatype is not supported in kogito bpmn. We had to wrap the List type variable inside a Pojo. and hence we have only one variable in the POJO.

Data Index - Mapping Issue for duplicate Named Variables at top level

Describe the bug

if there is a variable at parent level in bpmn and similar variable name is also there inside of a java class then it seems data index does not map the data correctly.

Sample Example to demonstrate the issue.

{
  "cd": {
    "createdDate": "2022-03-08T00:00:00Z",
    "updatedDate": "2022-03-08T00:00:00Z",
    "cntdec": "cntDec"
  },
  "createdDate": "2022-03-11T00:00:00Z",
  "lc": {
    "createdDate": "2022-03-09T00:00:00Z",
    "updatedDate": "2022-03-09T00:00:00Z",
    "lc": "lc"
  },
  "updatedDate": "2022-03-12T00:00:00Z",
  "al": {
    "createdDate": "2022-03-10T00:00:00Z",
    "updatedDate": "2022-03-10T00:00:00Z",
    "al": "al"
  }
}

In the above payload we have createdDate inside of obejcts al/cd/lc variables as well as at parent level .
Though the data is persisted correctly but seems the mapping to push to data index overwrites the data.

We get the following output

{
  "data": {
    "Duplicate": [
      {
        "al": {
          "al": "al",
          "createdDate": "2022-03-10T00:00:00Z",
          "updatedDate": "2022-03-10T00:00:00Z"
        },
        "cd": {
          "cntdec": "cntDec",
          "createdDate": "2022-03-08T00:00:00Z",
          "updatedDate": "2022-03-08T00:00:00Z"
        },
        "createdDate": "2022-03-08T00:00:00Z",
        "id": "06ee32c1-e353-481f-8260-a96c2f0bc3a8",
        "lc": {
          "createdDate": "2022-03-09T00:00:00Z",
          "lc": "lc",
          "updatedDate": "2022-03-09T00:00:00Z"
        },
        "updatedDate": "2022-03-08T00:00:00Z",
        "metadata": {
          "lastUpdate": "2023-01-30T05:50:15.6Z",
          "processInstances": [
            {
              "id": "06ee32c1-e353-481f-8260-a96c2f0bc3a8",
              "state": "ACTIVE",
              "roles": null
            }
          ]
        }
      }
    ]
  }
}

You can see the top level createdDate and updatedDate are having value of "2022-03-08T00:00:00Z" This is coming from the data we see in variable cd which as the same variable name within it.
Need to check the mapping logic for the data index.
Screenshot 2023-01-30 at 11 30 17 AM
Screenshot 2023-01-30 at 11 40 06 AM

As you can see the data from cntDec is incorrectly added on createdDate and updatedDate in DI . Need to figure where the mapping have issue for parent level objects.

p.s. Data in db is persisted correclty.

Expected behavior

{
  "data": {
    "Duplicate": [
      {
        "al": {
          "al": "al",
          "createdDate": "2022-03-10T00:00:00Z",
          "updatedDate": "2022-03-10T00:00:00Z"
        },
        "cd": {
          "cntdec": "cntDec",
          "createdDate": "2022-03-08T00:00:00Z",
          "updatedDate": "2022-03-08T00:00:00Z"
        },
        "createdDate": "2022-03-11T00:00:00Z",
        "id": "06ee32c1-e353-481f-8260-a96c2f0bc3a8",
        "lc": {
          "createdDate": "2022-03-09T00:00:00Z",
          "lc": "lc",
          "updatedDate": "2022-03-09T00:00:00Z"
        },
        "updatedDate": "2022-03-12T00:00:00Z",
        "metadata": {
          "lastUpdate": "2023-01-30T05:50:15.6Z",
          "processInstances": [
            {
              "id": "06ee32c1-e353-481f-8260-a96c2f0bc3a8",
              "state": "ACTIVE",
              "roles": null
            }
          ]
        }
      }
    ]
  }
}

Above should have been the output viz. createdDate = 11 Mar and updatedDate=12-mar as per payload.

Actual behavior

{
  "data": {
    "Duplicate": [
      {
        "al": {
          "al": "al",
          "createdDate": "2022-03-10T00:00:00Z",
          "updatedDate": "2022-03-10T00:00:00Z"
        },
        "cd": {
          "cntdec": "cntDec",
          "createdDate": "2022-03-08T00:00:00Z",
          "updatedDate": "2022-03-08T00:00:00Z"
        },
        "createdDate": "2022-03-08T00:00:00Z",
        "id": "06ee32c1-e353-481f-8260-a96c2f0bc3a8",
        "lc": {
          "createdDate": "2022-03-09T00:00:00Z",
          "lc": "lc",
          "updatedDate": "2022-03-09T00:00:00Z"
        },
        "updatedDate": "2022-03-08T00:00:00Z",
        "metadata": {
          "lastUpdate": "2023-01-30T05:50:15.6Z",
          "processInstances": [
            {
              "id": "06ee32c1-e353-481f-8260-a96c2f0bc3a8",
              "state": "ACTIVE",
              "roles": null
            }
          ]
        }
      }
    ]
  }
}

How to Reproduce?

use the attached bpmn2 file to test the error.

duplicate_variable_name.zip

Output of uname -a or ver

Darwin Mac-mini.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:04:44 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8103 arm64

Output of java -version

openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

1.33.0.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /Users/debabratapatnaik/.m2/wrapper/dists/apache-maven-3.8.6-bin/67568434/apache-maven-3.8.6 Java version: 19.0.1, vendor: GraalVM Community, runtime: /Library/Java/JavaVirtualMachines/graalvm-ce-java19-22.3.0/Contents/Home Default locale: en_IN, platform encoding: UTF-8 OS name: "mac os x", version: "13.1", arch: "aarch64", family: "mac"

Additional information

fix the issue in di mapping itsonly result mapping issue.

Event Processing without Error Handling in Data Index and Sequential Processing between runtime and DataIndex MongoDB

Describe the bug

There is no explicit error handling during event processing in data index.
ReactiveMessagingEventConsumer/BlockingMessagingEventConsumer,

@Incoming(KOGITO_PROCESSINSTANCES_EVENTS)
    public Uni<Void> onProcessInstanceEvent(ProcessInstanceDataEvent<?> event) {
        LOGGER.debug("Process instance consumer received ProcessInstanceDataEvent: \n{}", event);
        return Uni.createFrom().item(event)
                .invoke(indexingService::indexProcessInstanceEvent)
                .invoke(eventPublisher::fire)
                .onFailure()
                .invoke(t -> LOGGER.error("Error processing process instance ProcessInstanceDataEvent: {}", t.getMessage(), t))
                .onItem().ignore().andContinueWithNull();
    }

    @Incoming(KOGITO_USERTASKINSTANCES_EVENTS)
    public Uni<Void> onUserTaskInstanceEvent(UserTaskInstanceDataEvent<?> event) {
        LOGGER.debug("Task instance received UserTaskInstanceDataEvent \n{}", event);
        return Uni.createFrom().item(event)
                .invoke(indexingService::indexUserTaskInstanceEvent)
                .invoke(eventPublisher::fire)
                .onFailure()
                .invoke(t -> LOGGER.error("Error processing task instance UserTaskInstanceDataEvent: {}", t.getMessage(), t))
                .onItem().ignore().andContinueWithNull();
    }

If any error occurs then its silently ignored.
Can there be something to either store the message which failed.

There is one more issue with the usecase

AbstractTransactionManager.java

 @Override
    public void onBeforeStartEvent(UnitOfWorkStartEvent event) {
        if (!enabled()) {
            return;
        }

        ClientSession clientSession = mongoClient.startSession();
        this.clientSessionLocal.set(clientSession);
        TransactionOptions txnOptions = TransactionOptions.builder()
                .readPreference(ReadPreference.primary())
                .readConcern(ReadConcern.MAJORITY)
                .writeConcern(WriteConcern.MAJORITY)
                .build();
        clientSession.startTransaction(txnOptions);
    }

    @Override
    public void onAfterEndEvent(UnitOfWorkEndEvent event) {
        if (!enabled()) {
            return;
        }

        try (ClientSession clientSession = this.getClientSession()) {
            clientSession.commitTransaction();
        } finally {
            clientSessionLocal.remove();
        }
    }

How to ensure consistency between runtime and dataindex. We see in rare cases the following is happening.
1.Lets assume we have 3 servers in replica set S1/S2/S3 and the publisher app is writing to S1/S3 for the majority write config.
2. Data is not yet acknowledges from majority
3. The cloud event is fired and say data index which is the consumer of cloud event is able to process the event
4. DI is reading data from the mongodb and thus it might be reading old data to update.
5. Say if it connects to S2 it will read old data. as default read concern is local.
6. How can we avoid this scenario. Please advise on this.
7. What should be the read concern in mongodb for the dataindex in replica set mode out of the following
local/available/majority/linearizable/snapshot

Expected behavior

Ideally runtime persistence completion should trigger events and then data index should always get the latest data from the system.

Moreover any errror in event processing must be stored rather than silently ignoring them in the system.
Do advise on the solution.

Actual behavior

we see DI process data after receiving events but the data read from mongo db in certain scenarios is stale or old thus we get incorrect updates in database.

DI must not read anything at all from acutal runtime collection.

How to Reproduce?

This is tricky as it is not reproduceable. These are kindly edge cases where if event processing is fast, data read sometimes are stale. Need help on right config to make DI read latest data and any error in DI must be logged rather than silently ignoring them.

Output of uname -a or ver

Darwin Mac-mini.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:04:44 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8103 arm64

Output of java -version

openjdk version "20.0.1" 2023-04-18 OpenJDK Runtime Environment GraalVM CE 20.0.1-dev+9.1 (build 20.0.1+9-jvmci-23.1-b02) OpenJDK 64-Bit Server VM GraalVM CE 20.0.1-dev+9.1 (build 20.0.1+9-jvmci-23.1-b02, mixed mode, sharing)

GraalVM version (if different from Java)

20.0.1

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

1.44.1

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.2 (c9616018c7a021c1c39be70fb2843d6f5f9b8a1c) Maven home: /opt/apache-maven-3.9.2 Java version: 20.0.1, vendor: GraalVM Community, runtime: /Library/Java/JavaVirtualMachines/graalvm-community-openjdk-20.0.1+9.1/Contents/Home Default locale: en_IN, platform encoding: UTF-8 OS name: "mac os x", version: "13.1", arch: "aarch64", family: "mac"

Additional information

2 issues

  1. error handling support in di and logging the errors in somecollection for debugging
  2. di processing on latest data from runtime.

Support for Java Primitives or Simple Data Types

At present the only supported Java Primitives are

  1. String
  2. Boolean
  3. Numeric Just Integer - Range: -2147483648 to 2147483647
  4. DateTime (java.util.Date)

There are standard primitives which are not supported yet.
(Non Blocker) byte -> its actually supported with Integer but can be helpful for memory utilization if added. range -128 to 127
(Non Blocker) short -> 16-bit so -32768 to 32767 can be modelled under Integer which is supported
(Blocker) long -> -9223372036854775808 to 9223372036854775807 This is currently not supported
(Blocker) float -> 32-bit IEEE 754 floating point
(Blocker) double -> double-precision 64-bit IEEE 754 floating point
(Non Blocker) char -> single 16-bit Unicode character can use String for this.

Error when configuring auth policy with DataIndex

Describe the bug

With the following properties are added to in the application.properties of the data index instance (running on local minikube) to only allow some users to access the graphql endpoint:

quarkus.http.auth.policy.role-policy1.roles-allowed=user
quarkus.http.auth.permission.roles1.paths=/graphql/*
quarkus.http.auth.permission.roles1.policy=role-policy1

But I get the following error:

Caused by: java.lang.RuntimeException: Unable to find HTTP security policy role-policy1
        at io.quarkus.vertx.http.runtime.security.PathMatchingHttpSecurityPolicy.init(PathMatchingHttpSecurityPolicy.java:96)
        at io.quarkus.vertx.http.runtime.security.HttpSecurityRecorder$4.created(HttpSecurityRecorder.java:217)
        at io.quarkus.arc.runtime.ArcRecorder.initBeanContainer(ArcRecorder.java:73)
        at io.quarkus.deployment.steps.ArcProcessor$generateResources844392269.deploy_0(Unknown Source)
        at io.quarkus.deployment.steps.ArcProcessor$generateResources844392269.deploy(Unknown Source)

It's like the 1st property is ignored...

When setting those properties in a brand new quarkus project (https://quarkus.io/guides/security-oidc-bearer-token-authentication-tutorial) or inside a workflow project, there is no such error

Expected behavior

No Error should be thrown and only user associated with the role user shall be able to access /graphql endpoint

Actual behavior

An error is thrown so the DataIndex is not starting

How to Reproduce?

Steps to reproduce:

  1. Add the following props to the application.properties file:
quarkus.http.auth.policy.role-policy1.roles-allowed=user
quarkus.http.auth.permission.roles1.paths=/graphql/*
quarkus.http.auth.permission.roles1.policy=role-policy1
  1. Start the application or restart the pod

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

Here is the manifest I use to deploy the DataIndex service in minikue:

kind: Deployment
apiVersion: apps/v1
metadata:
  name: data-index
spec:
  replicas: 1
  selector:
    matchLabels:
      app: data-index
  template:
    metadata:
      labels:
        app: data-index
    spec:
      containers:
      - name: data-index
        image: quay.io/kiegroup/kogito-data-index-postgresql:1.44.1
        resources:
          requests:
            memory: "256Mi"
            cpu: "500m"
          limits:
            memory: "512Mi"
            cpu: "1000m"
        ports:
        - containerPort: 8080
        env:
        - name: QUARKUS_PROFILE
          value: http-events-support
        - name: KOGITO_DATA_INDEX_QUARKUS_PROFILE
          value: http-events-support
        - name: QUARKUS_HTTP_AUTH_POLICY__ROLE_POLICY12__ROLES_ALLOWED
          value: user
        - name: QUARKUS_HTTP_AUTH_PERMISSION__PERMISSIONS12__POLICY
          value: ROLE_POLICY12
        - name: QUARKUS_HTTP_AUTH_PERMISSION__PERMISSIONS12__PATH
          value: /graphql/*
        - name: QUARKUS_DATASOURCE_USERNAME
          valueFrom:
            secretKeyRef:
              name: postgres-secrets
              key: POSTGRES_USER
        - name: QUARKUS_DATASOURCE_PASSWORD
          valueFrom:
            secretKeyRef:
              name: postgres-secrets
              key: POSTGRES_PASSWORD
        volumeMounts:
        - name: application-config
          mountPath: "/home/kogito/config"
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /q/health/live
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 0
          periodSeconds: 30
          successThreshold: 1
          timeoutSeconds: 10
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /q/health/ready
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 0
          periodSeconds: 30
          successThreshold: 1
          timeoutSeconds: 10
      volumes:
      - name: application-config
        configMap:
          name: data-index-properties
      initContainers:
      - name: init-postgres
        image: busybox:1.36
        imagePullPolicy: IfNotPresent
        command: ['sh', '-c', 'until nc -vz postgres-db-service.postgres.svc.cluster.local 5432; do echo "Waiting for postgres server"; sleep 3; done;']
---
kind: Service
apiVersion: v1
metadata:
  name: data-index-service
  labels:
    app: data-index
spec:
  selector:
    app: data-index
  ports:
  - protocol: TCP
    port: 80
    targetPort: 8080
  type: NodePort

And here is my application.properties files (that is in the configmap data-index-properties):

quarkus.http.port=8080
quarkus.http.cors=true
quarkus.http.cors.origins=/.*/
quarkus.profile=http-events-support
#quarkus.log.category."org.kie.kogito.index".min-level=DEBUG
quarkus.log.category."org.kie.kogito.index".level=DEBUG
quarkus.log.category."io.quarkus.vertx.http".level=TRACE
quarkus.log.category."io.quarkus.arc".level=TRACE


quarkus.datasource.data_index.db-kind=postgresql
quarkus.datasource.jdbc.url=jdbc:postgresql://postgres-db-service.postgres:5432/sonataflow?currentSchema=data-index-service
quarkus.hibernate-orm.database.generation=update
quarkus.flyway.migrate-at-start=true
quarkus.flyway.table=data-index-flyway

#kogito.data-index.quarkus_profile=http-events-support

# Disable kafka client health check since the quarkus-http connector is being used instead.
quarkus.smallrye-health.check."io.quarkus.kafka.client.health.KafkaHealthCheck".enabled=false
#quarkus.kafka.devservices.enabled=false
#quarkus.kafka.health.enabled=false

# OIDC Configuration
quarkus.oidc.auth-server-url=https://keycloak.192.168.58.2.nip.io/realms/quarkus
quarkus.oidc.client-id=test
quarkus.oidc.credentials.secret=DP4yGzYhtdzGt9jEEJW7bvWmeqmekKii
quarkus.oidc.tls.verification=none

quarkus-mongodb-panache crash kogito bpmn (cannot find class info in jandex index)

Describe the bug

I'd added object as model to store kogito's data, and it is working fine for workflow. However, I would like to further store the object into mongodb database using quarkus-mongodb-panache. When the object extend from paneche ith gave error cannot find class info in jandex index. Quarkus team feed back this issue from Kogito, you may refer the original post which provided full sample:
quarkusio/quarkus#29691

Expected behavior

specific object extended mongodbpanche shall allow compile instead error

Actual behavior

compilation failed and cause by (cannot find class info in jandex index)

How to Reproduce?

refer quarkusio/quarkus#29691

Output of uname -a or ver

Darwin kstans-MacBook-Pro.local 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08, mixed mode, sharing)

GraalVM version (if different from Java)

openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08, mixed mode, sharing)

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

2.14.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6

Additional information

No response

Many "Unrecognized configuration key" when adding runtime-tools-quarkus-extension dependency

Describe the bug

When adding

<dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>runtime-tools-quarkus-extension</artifactId>
    </dependency>

dependency, it shows a lot of "Unrecognized configuration key".

Expected behavior

Shouldn't warn about any unknown configuration key, if all dependencies were right.

Actual behavior

Many "unrecognized configuration key"

How to Reproduce?

1-Get any quarkus kogito example (tested with process-usertasks-with-security-oidc-quarkus-with-console).
2-Modify pom.xml and add dependency:

<dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>runtime-tools-quarkus-extension</artifactId>
    </dependency>

3-./mvnw clean verify. Check warnings about missing configuration keys.

Output of uname -a or ver

Linux Ubuntu

Output of java -version

11

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

1.22.1

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Log level cannot be set to DEBUG or TRACE for data index

Describe the bug

These two properties https://github.com/apache/incubator-kie-kogito-apps/blob/main/data-index/data-index-service/data-index-service-postgresql/src/main/resources/application.properties#L46-47 prevents setting the level on runtime to a more detailed level, preventing the system to be debug. They should be removed

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Enter field is null for node when event type is error

Describe the bug

Issue apache/incubator-kie-issues#576 added a small change related with Node event types (a new state EVENT_TYPE_ERROR.
https://github.com/elguardian/kogito-apps/blob/d157e3a7595db61963c45d97173b22b02cbf335e/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceNodeDataEventMerger.java#L72C13-L74C23
When the event is of this type, the enter field might be left empty, but according to graphql definition, enter is not nullable, causing this exception

Full Error as JSON
{
  "error": {
    "name": "CombinedError",
    "message": "[GraphQL] The field at path '/ProcessInstances[0]/nodes[7]/enter' was declared as a non null type, but the code involved in retrieving data has wrongly returned a null value.  The graphql specification requires that the parent field be set to null, or if that is non nullable that it bubble up null to its parent and so on. The non-nullable type is 'DateTime' within parent type 'NodeInstance'\n[GraphQL] The field at path '/ProcessInstances[0]/nodes[8]/enter' was declared as a non null type, but the code involved in retrieving data has wrongly returned a null value.  The graphql specification requires that the parent field be set to null, or if that is non nullable that it bubble up null to its parent and so on. The non-nullable type is 'DateTime' within parent type 'NodeInstance'",
    "graphQLErrors": [
      {
        "message": "The field at path '/ProcessInstances[0]/nodes[7]/enter' was declared as a non null type, but the code involved in retrieving data has wrongly returned a null value.  The graphql specification requires that the parent field be set to null, or if that is non nullable that it bubble up null to its parent and so on. The non-nullable type is 'DateTime' within parent type 'NodeInstance'",
        "path": [
          "ProcessInstances",
          0,
          "nodes",
          7,
          "enter"
        ],
        "extensions": {
          "classification": "NullValueInNonNullableField"
        }
      },
      {
        "message": "The field at path '/ProcessInstances[0]/nodes[8]/enter' was declared as a non null type, but the code involved in retrieving data has wrongly returned a null value.  The graphql specification requires that the parent field be set to null, or if that is non nullable that it bubble up null to its parent and so on. The non-nullable type is 'DateTime' within parent type 'NodeInstance'",
        "path": [
          "ProcessInstances",
          0,
          "nodes",
          8,
          "enter"
        ],
        "extensions": {
          "classification": "NullValueInNonNullableField"
        }
      }
    ],
    "response": {}
  },
  "request": {
    "method": "GET",
    "url": "/instances/b9af370f-b873-4191-a43a-2b50bfd9d0e3"
  },
  "response": {
    "statusCode": 500
  }
}

Expected behavior

Enter should be always filled

Actual behavior

Enter is null when even type is error

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Configure Keycloak integration with Management and Task Console on Openshift/K8s environments

Hi community,

I'm trying to make travel example run into an Openshift 4.7.38 environment (Kubernetes v1.20.11+aa025a0), I was able to deploy whole pieces but management and task console don't work, when I try to use them they show an error to integrate with SSO.

Screenshot:

Screen Shot 2021-12-13 at 12 09 49

I already tried to configure the following environment variables:

  • KOGITO_CONSOLES_KEYCLOAK_URL
  • KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL
  • kogito.consoles.keycloak.config.url
  • KOGITO_CONSOLES_KEYCLOAK_CONFIG_URL
  • kogito.consoles.keycloak.config.health-check-url
  • KOGITO_CONSOLES_KEYCLOAK_CONFIG_HEALTH_CHECK_URL

Ate the end nothing worked, so I think that I must not be the first one that wanna deploy it over an Openshift environment, there are somebody that already fix it?, if not, how do you think it can be fixed?

totalCount is missing in GraphQL response

Describe the bug

Currently, it is possible to query the data using the Pagination schema. It provides

limit: int
offset: int

However, it makes more sense when the caller knows the result count which satisfy the executed graphQl query.

Expected behavior

Response should contain the

totalCount

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Use of Apache ActiveMQ or AMQP instead of Kafka

I don't see any blocker to this but I wanted to see if there were any technical reasons not to do this.

My current Quarkus project currently uses Apache ActiveMQ, and I would rather avoid needing to deploy Kafka AND ActiveMQ, Can I just change the application.properties and make Kogito Data Service use AMQP instead?

org.kie.kogito:kogito-addons-quarkus-cloudevents:jar is missing

Describe the bug

according document at https://docs.jboss.org/kogito/release/latest/html_single/#proc-messaging-enabling_kogito-developing-process-services:
there is need to install 2 extension:

  1. quarkus-smallrye-reactive-messaging-kafka. (exits)
  2. kogito-addons-quarkus-cloudevents. (doesn't exists)

I think (2) mean kogito-addons-quarkus-messaging is it? cause there is others place highlighted it and confusing.

Expected behavior

either kogito-addons-quarkus-cloudevent shall installable or have another appropriate name

Actual behavior

either kogito-addons-quarkus-cloudevent shall installable or have another appropriate name

How to Reproduce?

try run quarkus ext add kogito-addons-quarkus-cloudevent

Output of uname -a or ver

not relavent

Output of java -version

not relavent

GraalVM version (if different from Java)

not relavent

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

not relavent

Build tool (ie. output of mvnw --version or gradlew --version)

not relavent

Additional information

No response

lastUpdate should not be null

Describe the bug

According to GraphQL schema lastUpdate should not be null, but depending on the events received by DataIndex, it might be null.
Either the schema is updated to not require null, the code is updated so it is aligned with the schema.

Expected behavior

No response

Actual behavior

In some scenarios, lastUpdate is null and, if included in query, makes the query fail with exception

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Kogito - Data Index Support to Query Count

At present data Index only suppports paginated queries and total data based on filters.
The system have to keep hitting the api but is never sure on how many times to make paginated calls.

Can we have a option to return total count for a given filter. This will make the applications depend on it to support more data pull.
At present we have written custom calls to the domain cache and have own logic to parse the filter. It will be very good if we can have count for a given filter returned by DI queries itself.
@nmirasch Please advise on this.

Management console does not work on OpenShift

I have deployed on my OpenShift 4.7 with Kogito operator 1.4.0

$ kogito install infra kogito-infinispan-infra --kind Infinispan --apiVersion infinispan.org/v1
$ kogito install infra kogito-kafka-infra --kind Kafka --apiVersion kafka.strimzi.io/v1beta1
$ kogito install data-index --infra kogito-infinispan-infra --infra kogito-kafka-infra
$ kogito deploy-service travels --infra kogito-infinispan-infra --infra kogito-kafka-infra
$ kogito deploy-service visas --infra kogito-infinispan-infra --infra kogito-kafka-infra

when I deploy the menagement console like
https://docs.jboss.org/kogito/release/1.4.0/html_single/#con-management-console_kogito-developing-process-services

$ kogito install mgmt-console 

I get on the UI "Error connecting server", log

INFO Data index url not set, default will be used: http://localhost:8180

Workaround: set the data index url in the configmap "management-console-properties"

kind: ConfigMap
apiVersion: v1
metadata:
  name: management-console-properties
  namespace: kogito-travel-agency
data:
  application.properties: |-

    kogito.service.url=http://data-index:80
    quarkus.http.cors=true

data index service OIDC protection Graphql at domain objects level and as RO/RW roles for query/mutation/subscription Endpoint

With capability to custom generate graphql endpoints, is it possible to add different roles to different domain objects.
viz. in travel agency problem flight and ticket can the have different roles assigned to them. Similarly can we have different roles for query/mutation/subscription.

Smallrye Graphql has been upated to support this, how to achieve in data index service.
quarkusio/quarkus#10001

Task console does not work on OpenShift

I have deployed on my OpenShift 4.7 with Kogito operator 1.4.0

$ kogito install infra kogito-infinispan-infra --kind Infinispan --apiVersion infinispan.org/v1
$ kogito install infra kogito-kafka-infra --kind Kafka --apiVersion kafka.strimzi.io/v1beta1
$ kogito install data-index --infra kogito-infinispan-infra --infra kogito-kafka-infra
$ kogito deploy-service travels --infra kogito-infinispan-infra --infra kogito-kafka-infra
$ kogito deploy-service visas --infra kogito-infinispan-infra --infra kogito-kafka-infra

when I deploy the task console like
https://docs.jboss.org/kogito/release/1.4.0/html_single/#con-task-console_kogito-developing-process-services

$ kogito install task-console 

I get on the UI "Error connecting server", log

INFO Data index url not set, default will be used: http://localhost:8180

Workaround like for the management console #741 does not help!
Configmap "task-console-properties"
Still "Data index url not set"

Improvements on the Job Service start-up and periodic jobs loading procedure

Description

Add the possibility for users to configure the ability to fire overdue jobs at the service start. While this will be the default behavior, it will be possible to disable it with a configuration parameter. Additionally remove existing limit on the loading queries.

Implementation ideas

No response

AND condition is not working within Objects/List of Objects in DI query

My requirement is - I have a process which contains an Array. I want to filter the process based on $elemMatch (used in Mongo Db) in an array. Is there a way I can query Array in DI.
If I use containsAny or Contains - the DI query is giving random results (not exact match).

Sample Query:
query Comments(where:
{commentary:
{commentList:
commentCategoryCode:{equal:"RESOLVE_NOTES"},
commentText:{like:"comment"}}}{

commentary {
commentList{
commentCategoryCode
commentText
}
}

}

Expected Result:
get all the commentary objects where commentCategoryCode is RESOLVE_NOTES and commentText is like "comments"

Actual Result:
getting results even if commentText is matching in commentCategoryCode = "NOTES"

Note: We have 2 commentCategoryCode - RESOLVE_NOTES and NOTES

data-index computes wrong serviceUrl

https://github.com/kiegroup/kogito-apps/blob/07160792a3f5bb9c36ccf0b66c6de745d5c410ee/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/graphql/GraphQLSchemaManager.java#L174

should use lastIndexOf(), e.g.

            return endpoint.contains("/" + context) ? endpoint.substring(0, endpoint.lastIndexOf("/" + context)) : null;

To see the problem using Kogito-travel-agency example, in travels app set kogito.service.url=http://travels.example.com.
Then start a new process instance.
When you query data-index service you will see the serviceUrl field as http:/ which is wrong.

Support for npm in ui-packages

Description

We use npm for our builds of ui project while kogito currently only support yarn. Can npm be added as a option for ui package builds.

Implementation ideas

allow for npm based build for kogito apps like management console/task console etc.

Jobs Service Embedded Addon do not allow to override the kogito.service.url parameter

Describe the bug

Jobs Service Embedded Addon hardcode the kogito.service.url parameter at build time, this does not allow to override the config property at runtime.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Data index incorrectly registered for date field to String

Bug Details:

As per screenshot attached, we have created bbmn file for createdDate and UpdatedDate as type java.util.Date. Proto file correctly generated for both these field as Date type but in data index it got registered incorrectly with type as String.
Could anyone please check this urgently as it is blocking our development activity?

dateType_changed_to_string_dataIndex_e3
dateType_in_protoFile_e2
dateTypeinBpmn_e1

Improve performance of Postgres event handling

Description

Currently there are O(N*N) updates in postgres when a process consisting on N nodes is executed.

  update
        nodes 
    set
        definition_id=?,
        enter=?,
        exit=?,
        name=?,
        node_id=?,
        process_instance_id=?,
        type=? 
    where
        id=?

The root cause is an inefficient handling of underlying JPA object. The storage layer is expected to consume a model object (for example ProcessInstance)
To do so, it maps the model to entity in this line
This create a new JPA instance with no tracking of which model property has been modified, so it has to write the whole object again.

Implementation ideas

  1. Do not use ProcessIntance model class in IndexingService, but a DTO interface that is implemented by every persistent layer, allowing performance optimization and avoiding a blind mapping that messed up the JPA bytecode.
  2. Change the existing Storage inteface to make it more flexible
  3. Another possibility, as proposed by @tiagodolphine is to not change any existing interface, but the Postgres DB schema and write everything into a jsonb column. Since it completely changes DB schema, it will make existing data unavailable.

In my opinion, the current storage interface, is seriously limiting the implementation choices. It is basically a cache, therefore extremely favours key value storage options, (specially at the performance side), so my recommendation is to modify current storage interface (replacing map semantic by a business one: addMilestone, addNode....) to give future implementers of other persistence plugins (for example, relational dbs with poor json supprt) enough freedom.

Duplicated information in the `variables` object

Describe the bug

Sometimes when variables are fetched from the Data Index, there is duplicated information in the response.

Expected behavior

I'd expect simply:

"variables": {
  "workflowdata": {
    "myKey": "myValue",
    "mantra": "Serverless Workflow is awesome!",
    "greeting": "Hello World"
  }
}

Actual behavior

If you fetch the variables, you'll get:

"variables": {
  "workflowdata": {
    "myKey": "myValue",
    "mantra": "Serverless Workflow is awesome!",
    "greeting": "Hello World"
  },
  "workflowdata.mantra": "Serverless Workflow is awesome!",
  "workflowdata.greeting": "Hello World"
}

See that mantra and greeting are duplicated.

How to Reproduce?

Take the Hello World workflow as an example and execute it with additional inputs, for instance:

{
    "myKey": "myValue"
}

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Data Index support to handle the same workflow/process name in different namespaces

Description

In a cloud environment when a workflow is deployed via a sonataflow CR, the identity of a workflow in the context of a k8s cluster is determined by a combination of the workflow's name and namespace.
However, in the Data-Index, there is no concept of a namespace of a workflow.

This might lead to a problem when deploying two workflows on the same cluster into different namespaces.
Having supported the SonataflowClusterPlatform as a method to create a global Data-index that expands over the cluster, we might hit a situation in which two (or more) workflows with the same name will be deployed successfully in their namespace, however only the later workflow definition will be available in the Data-Index.

The implication in this case is not being able to view/list/track workflows from other namespaces via the Data-index, and if relying on the Data-index to expose the endpoint for the workflow, the target workflow might be the undesired one.

A similar issue is reported to the operator: apache/incubator-kie-kogito-serverless-operator#442

Implementation ideas

No response

Reload process/worfkflow instances dynamically in DevUI

Description

Reload process/workflow instances dynamically in DevUI.

If you create any process/workflow instance, you have to click the reload button to see the new instances.

Acceptance criteria

Every time a new instance is created, it is shown among other instances in DevUI immediately.

Implementation ideas

No response

Management Console/Task Console support for custom Security

Description

Current implementation for Console applications is to use keycloak and we have already been using all kogito apps.
Have custom built our apps for interacting with kogito APIs.
Can Managment Console and Task Console be made available with support for quarkus-oidc. We have been using custom apps. for this. Need help from Kogito Team to add some light to this

Data Index is already supporting quarkus-oidc. Need this to be extended to other kogito-apps in console

https://issues.redhat.com/browse/KOGITO-8419 Created now if added will help use more components from kogito ecosystem.

Implementation ideas

Refer to the details at https://issues.redhat.com/browse/KOGITO-8419
We have seen in data index how it handles custom security.

org.kie.kogito.index.auth.MultiTenantResolver class helps integration quarkus-oidc client though keycloak is default.

Can the same be added to all web apps applications.

/*
 * Copyright 2020 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.kie.kogito.index.auth;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

import org.eclipse.microprofile.config.inject.ConfigProperty;

import io.quarkus.oidc.TenantResolver;
import io.vertx.ext.web.RoutingContext;

@ApplicationScoped
public class MultiTenantResolver implements TenantResolver {

    @Inject
    @ConfigProperty(name = "kogito.data-index.vertx-graphql.ui.path", defaultValue = "/graphiql")
    String graphUIPath;

    @Inject
    @ConfigProperty(name = "kogito.data-index.vertx-graphql.ui.tenant", defaultValue = "web-app-tenant")
    String graphUITenantId;

    @Override
    public String resolve(RoutingContext context) {
        if (context.request().path().equals("/") || context.request().path().startsWith(graphUIPath)) {
            return graphUITenantId;
        }
        return null;
    }
}

So to enable security only the following to be tweaked in DI

  1. kogito.data-index.vertx-graphql.ui.tenant=default
  2. quarkus.oidc.tenant-enabled=true
    Can something similar be added on the mgmt console/task console as well. or is there a way to disable security in the console apps

[apache-ci] nightly native build-and-test job for kogito-apps fails on data-audit-quarkus-jpa-service

Describe the bug

Nightly native build job of kogito-apps [1] fails consistently for past week.

The failure i caused by data-audit-quarkus-jpa-service project.
Relevant output from logs:

[2024-02-19T02:57:14.709Z] ========================================================================================================================
[2024-02-19T02:57:14.709Z] GraalVM Native Image: Generating 'data-audit-quarkus-jpa-service-999-SNAPSHOT-runner' (executable)...
[2024-02-19T02:57:14.709Z] ========================================================================================================================
[2024-02-19T02:57:14.709Z] For detailed information and explanations on the build output, visit:
[2024-02-19T02:57:14.709Z] https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/BuildOutput.md
[2024-02-19T02:57:14.709Z] ------------------------------------------------------------------------------------------------------------------------
[2024-02-19T02:57:14.709Z] Warning: The host machine does not support all features of 'x86-64-v3'. Falling back to '-march=compatibility' for best compatibility.
[2024-02-19T02:57:19.239Z] [1/8] Initializing...                                                                                   (11.9s @ 0.60GB)
[2024-02-19T02:57:19.239Z]  Java version: 17.0.10+7, vendor version: Mandrel-23.0.3.0-Final
[2024-02-19T02:57:19.239Z]  Graal compiler: optimization level: 2, target machine: compatibility
[2024-02-19T02:57:19.239Z]  C compiler: gcc (redhat, x86_64, 8.5.0)
[2024-02-19T02:57:19.239Z]  Garbage collector: Serial GC (max heap size: 80% of RAM)
[2024-02-19T02:57:19.239Z]  9 user-specific feature(s)
[2024-02-19T02:57:19.239Z]  - com.oracle.svm.thirdparty.gson.GsonFeature
[2024-02-19T02:57:19.239Z]  - io.quarkus.caffeine.runtime.graal.CacheConstructorsFeature
[2024-02-19T02:57:19.239Z]  - io.quarkus.hibernate.orm.runtime.graal.DisableLoggingFeature: Disables INFO logging during the analysis phase
[2024-02-19T02:57:19.239Z]  - io.quarkus.jdbc.h2.runtime.H2Reflections: Support for H2 Database's extended data types
[2024-02-19T02:57:19.239Z]  - io.quarkus.jdbc.postgresql.runtime.graal.SQLXMLFeature
[2024-02-19T02:57:19.239Z]  - io.quarkus.runner.Feature: Auto-generated class by Quarkus from the existing extensions
[2024-02-19T02:57:19.239Z]  - io.quarkus.runtime.graal.DisableLoggingFeature: Disables INFO logging during the analysis phase
[2024-02-19T02:57:19.239Z]  - org.eclipse.angus.activation.nativeimage.AngusActivationFeature
[2024-02-19T02:57:19.239Z]  - org.hibernate.graalvm.internal.GraalVMStaticFeature: Hibernate ORM's static reflection registrations for GraalVM
[2024-02-19T02:57:20.643Z] 02:57:20,274 WARN  [org.hib.orm.deprecation] HHH90000025: H2Dialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
[2024-02-19T02:58:39.732Z] [2/8] Performing analysis...  [*****]                                                                   (69.4s @ 2.96GB)
[2024-02-19T02:58:39.732Z]   27,503 (90.27%) of 30,469 types reachable
[2024-02-19T02:58:39.732Z]   42,872 (65.46%) of 65,494 fields reachable
[2024-02-19T02:58:39.732Z]  140,077 (58.21%) of 240,639 methods reachable
[2024-02-19T02:58:39.732Z]    7,716 types,   318 fields, and 4,693 methods registered for reflection
[2024-02-19T02:58:39.732Z]       64 types,    70 fields, and    55 methods registered for JNI access
[2024-02-19T02:58:39.732Z]        4 native libraries: dl, pthread, rt, z
[2024-02-19T02:58:39.732Z] 
[2024-02-19T02:58:39.732Z] Error: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected.  To see how this object got instantiated use --trace-object-instantiation=java.util.Random. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=<class-name>. Or you can write your own initialization methods and call them explicitly from your main entry point.
[2024-02-19T02:58:39.732Z] Detailed message:
[2024-02-19T02:58:39.732Z] Trace: Object was reached by
[2024-02-19T02:58:39.732Z]   trying to constant fold static field org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.RNG
[2024-02-19T02:58:39.732Z]     at org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.access$100(SaslClientAuthenticator.java:77)
[2024-02-19T02:58:39.732Z]   parsing method org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.access$100(SaslClientAuthenticator.java:77) reachable via the parsing context
[2024-02-19T02:58:39.732Z]     at static root method.(Unknown Source)
[2024-02-19T02:58:39.732Z] 
[2024-02-19T02:58:39.732Z] 
[2024-02-19T02:58:39.732Z] com.oracle.svm.core.util.UserError$UserException: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected.  To see how this object got instantiated use --trace-object-instantiation=java.util.Random. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=<class-name>. Or you can write your own initialization methods and call them explicitly from your main entry point.
[2024-02-19T02:58:39.732Z] Detailed message:
[2024-02-19T02:58:39.732Z] Trace: Object was reached by
[2024-02-19T02:58:39.732Z]   trying to constant fold static field org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.RNG
[2024-02-19T02:58:39.732Z]     at org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.access$100(SaslClientAuthenticator.java:77)
[2024-02-19T02:58:39.732Z]   parsing method org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.access$100(SaslClientAuthenticator.java:77) reachable via the parsing context
[2024-02-19T02:58:39.732Z]     at static root method.(Unknown Source)
[2024-02-19T02:58:39.732Z] 
[2024-02-19T02:58:39.732Z] 
[2024-02-19T02:58:39.732Z] 	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:85)
[2024-02-19T02:58:39.732Z] 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:248)
[2024-02-19T02:58:39.732Z] 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:798)
[2024-02-19T02:58:39.732Z] 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:582)
[2024-02-19T02:58:39.732Z] 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:539)
[2024-02-19T02:58:39.732Z] 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:408)
[2024-02-19T02:58:39.732Z] 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:612)
[2024-02-19T02:58:39.732Z] 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:134)
[2024-02-19T02:58:39.732Z] 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)
[2024-02-19T02:58:39.732Z] Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected.  To see how this object got instantiated use --trace-object-instantiation=java.util.Random. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=<class-name>. Or you can write your own initialization methods and call them explicitly from your main entry point.
[2024-02-19T02:58:39.732Z] Detailed message:
[2024-02-19T02:58:39.732Z] Trace: Object was reached by
[2024-02-19T02:58:39.732Z]   trying to constant fold static field org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.RNG
[2024-02-19T02:58:39.732Z]     at org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.access$100(SaslClientAuthenticator.java:77)
[2024-02-19T02:58:39.732Z]   parsing method org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.access$100(SaslClientAuthenticator.java:77) reachable via the parsing context
[2024-02-19T02:58:39.732Z]     at static root method.(Unknown Source)
[2024-02-19T02:58:39.732Z] 
[2024-02-19T02:58:39.732Z] 
[2024-02-19T02:58:39.732Z] 	at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:126)
[2024-02-19T02:58:39.732Z] 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:793)
[2024-02-19T02:58:39.732Z] 	... 6 more
[2024-02-19T02:58:39.732Z] ------------------------------------------------------------------------------------------------------------------------
[2024-02-19T02:58:39.732Z]                         5.4s (6.4% of total time) in 36 GCs | Peak RSS: 5.45GB | CPU load: 13.71
[2024-02-19T02:58:39.732Z] ------------------------------------------------------------------------------------------------------------------------

[1] https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/nightly.native/job/kogito-apps.build-and-test/

Expected behavior

The job will be passing and no test failures:
https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/nightly.native/job/kogito-apps.build-and-test/lastCompletedBuild/testReport/

Actual behavior

Job si failing and there are test failures.
https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/nightly.native/job/kogito-apps.build-and-test/lastCompletedBuild/testReport/

How to Reproduce?

Execute https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/nightly.native/job/kogito-apps.build-and-test/

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

s390x support documentation

Description

Here is some notes for things i ran into trying to enable s390x support, mainly documenting missing images needed for the tests cases. Incase someone finds this info useful in the future

building

building is same as building for x86
see instructions at https://github.com/kiegroup/kogito-apps#building-from-source
Install Yarn

cd kogito-apps/ui-packages
npm install -D yarn

Install projects dependencies using Yarn

yarn install

Build with Yarn:

yarn run init
yarn run build

Tests fail due to missing images on Z

org.kie.kogito/integration-tests-task-assigning-service-processes   1.11.1.Final   f1553977f6a0   8 hours ago     344MB
org.kie.kogito/integration-tests-trusty-service-quarkus             1.11.1.Final   7437fb59a7bd   8 hours ago     253MB
org.kie.kogito/task-assigning-service                               1.11.1.Final   7b2546e5b68e   8 hours ago     321MB
org.kie.kogito/trusty-service-infinispan                            1.11.1.Final   dd5929e769ad   8 hours ago     291MB
org.kie.kogito/explainability-service-messaging                     1.11.1.Final   a2141cbfce20   8 hours ago     308MB
org.kie.kogito/data-index-service-inmemory                          1.11.1.Final   fa9a89da2d3b   9 hours ago     441MB
org.kie.kogito/data-index-service-postgresql                        1.11.1.Final   9952af6ec7f1   9 hours ago     369MB
org.kie.kogito/data-index-service-mongodb                           1.11.1.Final   ad148f5c4a0c   9 hours ago     351MB
org.kie.kogito/data-index-service-infinispan                        1.11.1.Final   303ccd509df5   9 hours ago     346MB
org.kie.kogito/jobs-service-inmemory                                1.11.1.Final   0148580b93e6   9 hours ago     387MB
org.kie.kogito/jobs-service-mongodb                                 1.11.1.Final   d5b1bd624696   9 hours ago     325MB
org.kie.kogito/jobs-service-postgresql                              1.11.1.Final   a46919f38ae1   9 hours ago     315MB
org.kie.kogito/jobs-service-infinispan                              1.11.1.Final   1f446ff96828   9 hours ago     322MB
org.kie.kogito/jobs-service-common                                  1.11.1.Final   c1e4b9fec2ba   9 hours ago     307MB
confluentinc/cp-kafka                                               5.4.3          89534fffaf40   6 weeks ago     667MB
jboss/keycloak                                                      14.0.0         058a3f729d40   4 months ago    714MB
quay.io/keycloak/keycloak                                           14.0.0         a12419875629   4 months ago    714MB
infinispan/server                                                   12.1.7.Final   466627814673   4 months ago    481MB
vectorized/redpanda                                                 v21.5.5        98ca2a6da004   6 months ago    645MB
testcontainers/sshd                                                 1.0.0          b665446a05c2   17 months ago   7.8MB
org.kie.kogito/integration-tests-trusty-service-springboot          1.11.1.Final   08df56f26251   51 years ago    270MB

Implementation ideas

No response

Google/Custom OIDC /OAuth2 setup with Kogito Dataindex/management console/task console and configuring graphql security without keycloak

Hi Team,
In our organisation we use internal active directory and federation services. We do not manage via keycloak. Both Task Console and Management Console need keycloak setups. Is there any informaiton on how we can customize the same with quarkus security. Do we need to embedded our platfomr with that for the quarkus oidc or there is sample example to do this.

p.s. we cant use keycloak as our organisation have its own version of OAuth and OIDC setups. Please advise on this. Its blocking us from doing custom security.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.