apache / incubator-kie-kogito-examples

Kogito examples - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
255 stars 380 forks source link

process-usertasks-quarkus-with-console bugs #1492

Open kstan79 opened 1 year ago

kstan79 commented 1 year ago

Describe the bug

I notice 2 bugs in this example:

  1. user task console can't logout, it shown Invalid parameter: redirect_uri.
  2. management console click task can't show detail as explain in README.md. I clicked id link and expand arrow both no relaven info

Expected behavior

  1. by right able to logout
  2. according user guide by right click id should display bpmn diagram

Actual behavior

  1. cant logout cause by invalid redirecturl
  2. management console cant display task detail Screenshot 2022-12-02 at 7 46 07 AM Screenshot 2022-12-02 at 7 46 13 AM

How to Reproduce?

Im using mac. run below command: step 1: mvn clean package quarkus:dev -Ppostgresql

step2 (in docker-compose folder): sh ./startServices.sh postgresql

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 Homebrew (build 19.0.1) OpenJDK 64-Bit Server VM Homebrew (build 19.0.1, mixed mode, sharing)

GraalVM version (if different from Java)

not using this

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)

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /usr/local/Cellar/maven/3.8.6/libexec Java version: 19.0.1, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk/19.0.1/libexec/openjdk.jdk/Contents/Home Default locale: en_GB, platform encoding: UTF-8 OS name: "mac os x", version: "12.5.1", arch: "x86_64", family: "mac"

Additional information

No response

rajeshpalani2021 commented 1 year ago

I had a similar problem, Did you resolve the issue?

pefernan commented 1 year ago

@kstan79 thank you again for registering this issue. Will rise two jiras to tackle this asap. For what I could see, the logout issue is related to the keycloak image, looks we might need to adjust the logout in our consoles. As a workaround you may try using the keycloak image version we were previously using (jboss/keycloak) in the docker-compose file, maybe that could help you.

Regarding the other issue will look at the deps and fix the examples, of if you have a fix you could provide a PR with them.

rajeshpalani2021 commented 1 year ago

I had a similar problem, Did you resolve the issue?

@kstan79 I am trying to add the missing dependency, but where do you see the error message?

kstan79 commented 1 year ago

After sign in to keycloak, then logout will see that msg

rajeshpalani2021 commented 1 year ago

@kstan79 thanks, how about the #2 issue? did you fixed with the correct dependency? I still have that issue that can't see the task detail when i click the process task.

rajeshpalani2021 commented 1 year ago

@pefernan : I need some help from you, i tried your sample process-usertasks-quarkus-with-console project, everything works, except when I double-click the process instances, nothing shows up. and user task is not listing anything. can you please help or share me how to correct it?

kstan79 commented 1 year ago

sorry of late reply. It has been sometimes and I think i shall update to latest stable. below is my result:

  1. git pull
  2. copy process-usertasks-quarkus-with-console from repository to another place
  3. cd to -process-usertasks-quarkus-with-console
  4. mvn clean install -Ppostgresql #ok
  5. cd docker-compose
  6. sh ./startServices.sh or sh ./startServices.sh postgresql #failed, I have below msg: Error response from daemon: manifest for quay.io/kiegroup/kogito-data-index-postgresql:1.32 not found: manifest unknown: manifest unknown Screenshot 2022-12-20 at 12 18 28 AM

I cant continue the test at this moment

kstan79 commented 1 year ago

However, if I use runtime-tools-quarkus-extension, i have similar error after click borrowbooks 163b7:

Screenshot 2022-12-20 at 12 27 11 AM Screenshot 2022-12-20 at 12 29 11 AM
pefernan commented 1 year ago

Hi @kstan79 @rajeshpalani2021, sorry for the delay, we are looking into this issue. We'll come up with a fix but we need to understand what's going on internally. Please give us some time.

@kstan79 regarding the docker pull issue, would you mind trying again now? I had same issue yesterday night and now it's already gone.

cristianonicolai commented 1 year ago

the issue regarding pulling images is because 1.32 release is still in progress and images were not uploaded yet, this is expected to be solved as the release progresses.

as for data index, I opened the following PR https://github.com/kiegroup/kogito-apps/pull/1573, so it returns null instead of an error. @pefernan it might be worth checking if the console is prepared to handle null for these attributes.

kstan79 commented 1 year ago

I can't understand what is the progress behind. I just leave it till you guys give further notice?

guaido79 commented 1 year ago

Hi, I'm new this project and I'm exploring this project to do some evaluation. I see that there are some problem with data-index. The error on detail "Process not found" come from a

data-index          | 2022-12-21 10:19:42,227 WARN  [io.ver.ext.web.han.imp.LoggerHandlerImpl] (vert.x-eventloop-thread-3) 127.0.0.1 - - [Wed, 21 Dec 2022 10:19:42 GMT] "GET /management/processes/travels/source HTTP/1.1" 404 53 "-" "Vert.x-WebClient/4.3.5"
data-index          | 2022-12-21 10:19:42,228 WARN  [not.gra.exe.SimpleDataFetcherExceptionHandler] (vert.x-eventloop-thread-0) Exception while fetching data (/ProcessInstances[0]/source) : FAILED: Get Process Instance source file with processId: travels errorCode:404 errorStatus:Not Found errorMessage:<html><body><h1>Resource not found</h1></body></html>: org.kie.kogito.index.service.DataIndexServiceException: FAILED: Get Process Instance source file with processId: travels errorCode:404 errorStatus:Not Found errorMessage:<html><body><h1>Resource not found</h1></body></html>
data-index          |   at org.kie.kogito.index.api.KogitoRuntimeClientImpl.lambda$sendGetClientRequest$9(KogitoRuntimeClientImpl.java:354)
data-index          |   at io.vertx.ext.web.client.impl.HttpContext.handleDispatchResponse(HttpContext.java:397)
data-index          |   at io.vertx.ext.web.client.impl.HttpContext.execute(HttpContext.java:384)
data-index          |   at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:362)
data-index          |   at io.vertx.ext.web.client.impl.HttpContext.fire(HttpContext.java:329)
data-index          |   at io.vertx.ext.web.client.impl.HttpContext.dispatchResponse(HttpContext.java:291)
data-index          |   at io.vertx.ext.web.client.impl.HttpContext.lambda$null$7(HttpContext.java:507)
data-index          |   at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264)
data-index          |   at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:246)
data-index          |   at io.vertx.core.impl.EventLoopContext.lambda$runOnContext$0(EventLoopContext.java:43)
data-index          |   at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
data-index          |   at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
data-index          |   at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
data-index          |   at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566)
data-index          |   at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
data-index          |   at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
data-index          |   at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
data-index          |   at java.base/java.lang.Thread.run(Thread.java:829)

The problem is for every project, I see it on travel agency, and I think come from a not working configuration about data-index. If we start the data-index with the docker compose, we need to stop application creating it's own data-index:

quarkus.kogito.devservices.enabled=false

But after that we need to connect the application to a shared data index. In the project there are those properties:

kogito.service.url=http://localhost:8080
kogito.dataindex.http.url=http://localhost:8180
kogito.dataindex.ws.url=ws://localhost:8180

But are all ignored on startup:

[WARNING] [io.quarkus.config] Unrecognized configuration key "kogito.dataindex.ws.url" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo

There isn't any documentation on them, I just find this doc: https://quarkus.io/guides/kogito-dev-services

But this cover dev environment with multi service, but how to connect many service in a production environment to the same data-index?

Sorry for my bad english, hope to help, thanks

kstan79 commented 1 year ago

I think kogito quite stable while I install from quarkus extension, regarding quarkus existing example I do agree it is old and have few error. You may try kogito from

Kogito not come as 1 big package, it break into quite a few smaller package. If you install suitable package and defined properly configuration in application.properties. I think it is stable

You may follow the kogito documentation do to that, and refer example for source code and diagram only.

rajeshpalani2021 commented 1 year ago

@cristianonicolai : regarding the below PR, thanks for the quick fix, will the fix be added to the latest image(1.32) version?

PR kiegroup/kogito-apps#1573, so it returns null instead of an error.

cristianonicolai commented 1 year ago

@rajeshpalani2021 fix will land in Kogito version 1.33.0

rajeshpalani2021 commented 1 year ago

@cristianonicolai Thanks, i will be waiting for the 1.33, somehow the management console dont show the completed process in UI. is it because of the above fix is not in 1.32 or still the fix in management console needed to cover that?

rajeshpalani2021 commented 1 year ago

@cristianonicolai : looks like the 1.33 docker image is not in the quay.io. so the latest startservicesa are failling.