Compact Architecture in production

436 views
Skip to first unread message

Virginie Fort

unread,
Jan 24, 2025, 8:27:21 AM1/24/25
to Kogito development mailing list

282 / 5 000
Hello, First of all thank you all for the work you do with Kogito. It's a great tool. After playing around with full stacks, I discovered the compact architecture. Is it a viable architecture in production? Thank you for your valuable help.

Alex Porcelli

unread,
Jan 24, 2025, 8:38:25 AM1/24/25
to vf...@beetandcode.fr, Kogito development mailing list
In my personal opinion this is the preferred deployment architecture for production environment.

Regards,
_____________
Alex Porcelli
http://porcelli.me


On Fri, Jan 24, 2025 at 8:27 AM Virginie Fort <vf...@beetandcode.fr> wrote:

282 / 5 000
Hello, First of all thank you all for the work you do with Kogito. It's a great tool. After playing around with full stacks, I discovered the compact architecture. Is it a viable architecture in production? Thank you for your valuable help.

--
You received this message because you are subscribed to the Google Groups "Kogito development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kogito-developm...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/kogito-development/fcc7b419-392a-4937-a7d5-d0869e51e3e4n%40googlegroups.com.

Virginie Fort

unread,
Jan 24, 2025, 10:40:57 AM1/24/25
to Kogito development mailing list
Thank you very much for your response. I will try it.

Alex Porcelli

unread,
Jan 24, 2025, 10:42:27 AM1/24/25
to kogito-de...@googlegroups.com

Pawan Saha

unread,
Jan 24, 2025, 11:54:22 AM1/24/25
to Kogito development mailing list
Hi Alex,

I followed the steps in the link you shared:

https://github.com/porcelli/jbpm-compact-architecture-example

In the section "Show active Hiring process instance at Kogito Management Console", I performed the following step and received a response containing the process ID:

I added the property quarkus.http.port=9058 in application.properties to resolve a port conflict with 8080. 

pawan@XXXXXX:/mnt/c/Users/Pawan/Documents/pawan_projects/jbpm-compact-architecture-example-main$ curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://localhost:9058/hiring -d '{"candidateData": { "name": "Jon", "lastName": "Snow", "email": "j...@snow.org", "experience": 5, "skills": ["Java", "Kogito", "Fencing"]}}'

Response:

{"id":"5b584b3e-2f81-4e42-b63f-77d375445f4f","offer":{"category":"Senior Software Engineer","salary":40450}}

However, I don't see the process instance in an active state in the Kogito Management Console, despite executing the full example.

Screenshot 2025-01-24 221047.png

Could you please assist me in resolving this issue?

Regards,
Pawan Saha

Alex Porcelli

unread,
Jan 27, 2025, 8:59:09 PM1/27/25
to kogito-de...@googlegroups.com
I had some updates done in the referenced example; you might want to give it a try.

-
Alex


Virginie Fort

unread,
Jan 28, 2025, 3:12:10 AM1/28/25
to Kogito development mailing list
Hello, i had already found and adapted your example to my needs. Thank you very much for your work and your kindness. Now I am looking into the study of the life cycle in production (version of workflows and applications, migration of instances, etc.).

Pawan Saha

unread,
Jan 28, 2025, 3:16:42 AM1/28/25
to Kogito development mailing list

Hi Alex,


Thanks for the updates.

Findings:

When executed startServices.bat,

The Management Console is working fine now.

However, the Task Console is not populating data.


When executed startServices.sh,

The Management Console and Task Console are not populating data.


Regards,

Pawan


Pawan Saha

unread,
Jan 28, 2025, 7:38:29 AM1/28/25
to Kogito development mailing list

Hi Alex,


Thanks for the updates.

Findings:

When executed startServices.bat,

The Management Console is working fine now.

However, the Task Console is not populating data.


When executed startServices.sh,

The Management Console and Task Console are not populating data.


One more thing to mention (not sure if that's an issue or any wrong from my side.)

I can see the process diagram of the hiring flow that you created.

Screenshot 2025-01-28 180456.png

But when i created a new flow, I Don't see the process diagram, any suggestions please.

Screenshot 2025-01-28 180611.png


Regards,

Pawan

Alex Porcelli

unread,
Jan 29, 2025, 5:50:29 AM1/29/25
to kogito-de...@googlegroups.com
When you create a new process, you have to generate a .svg of it and place it inside META-INF/processSVG


pawan saha

unread,
Jan 29, 2025, 6:21:33 PM1/29/25
to kogito-de...@googlegroups.com, Pawan Saha

Hi Alex,

Thank you for your help! The process diagram is now visible.

However, I am still facing two issues:

  1. The Task Console is not populating data (same behavior with both startServices.bat and startServices.sh).
  2. The Management Console is not populating data when using startServices.sh, though it works fine with startServices.bat.

I would appreciate your guidance on resolving these issues.

Best regards,
Pawan




Timothy Wuthenow

unread,
Jan 29, 2025, 7:30:27 PM1/29/25
to Kogito development mailing list
Hi Pawan,

I've been working on updating this some and am going to put in a pull request on updating the example because there are some nuances to the Windows container if you are using it that are not present on Mac/Linux. When using Windows there are two potential issues that can hit:
1. With Jib, the path that the image gets created is different on Mac/Linux than Windows. I built a startServices.bat that creates the user prefix to Windows standards when running mvn clean package -Pcontainer. When using Mac/Linux, I've updated a similar parameter to try to make the whole thing more platform agnostic (there wasn't a Windows batch file until this week). The way I did it in the scripted file is the following that sets it similar to how the docker-compose.yml is setup from the original 10.x release. This is seen in the slightly modified docker-compose to utilize a more generic prefix that uses the scripts to fulfill the parameter.
2. Paths can be complicated with Windows (since / expected in Linux/Mac are \ in Windows coupled with C:\etc\path, so I also highly recommend if using Windows, to use the .bat file if possible over the .sh script.

So my recommendation on a potential way to work with the example is the following:
1. Clone either my version or Alex's merged of my branch that handles this (my version is forked of his original and he merged my changes)
2. After cloning, you can do mvn clean package -Pcontainer to build the container on the project root - this is not required in my new branch of this example)
3.To make things a little more convenient, I made it so the script you run (startServices.bat or startServices.sh) will check for a built version of the container of the image. This provides a y/n prompt to build the image or not. I typically rebuild it in case there are changes that are there, but it's not a deal breaker if not done if the image is working.
4. To run the script to the fullest extent (and how I'd recommend running the version that has Windows as I haven't tested other variations yet) is to run either ./startServices.sh full or on Windows run .\startServices.bat full - this will deploy the full compact architecture with a Keycloak server that is also providing the jdoe user on both management and task consoles as they sit in the 10.0.0 release. When main gets closer to release, I will update this accordingly for the changes that you can look into the branch on for more information.

Let me know if this helps you move forward!

Tim

pawan saha

unread,
Jan 30, 2025, 1:23:57 AM1/30/25
to kogito-de...@googlegroups.com, Pawan Saha

Hi Tim,

Thank you! I used Alex’s branch since your changes have already been merged. I also compared your updates and confirmed that I already have them in my setup.

For reference, my development OS is Windows, though the final deployment will be in a Linux environment.

Deployment Steps I Followed:

  1. mvn clean package -Pcontainer (optional, but I ran it anyway)
  2. .\startServices.bat full

However, the Task Console is not populating data. Could you please assist in troubleshooting this issue?

Also, I was wondering—would it be possible to run the Linux startServices.sh script in Windows using the Ubuntu (WSL) terminal? Would there be any compatibility concerns?

Looking forward to your insights.

Best regards,
Pawan


pawan saha

unread,
Jan 31, 2025, 3:20:06 PM1/31/25
to kogito-de...@googlegroups.com, Pawan Saha

Hi Tim, Alex,

Thank you! I used Alex’s branch since your changes have already been merged. I also compared your updates and confirmed that I already have them in my setup.

For reference, my development OS is Windows, though the final deployment will be in a Linux environment.

Deployment Steps I Followed:

  1. mvn clean package -Pcontainer (optional, but I ran it anyway)
  2. .\startServices.bat full

However, the Task Console is not populating data. Could you please assist here?

Also, I was wondering—would it be possible to run the Linux startServices.sh script in Windows using the Ubuntu (WSL) terminal? Would there be any compatibility concerns?

Looking forward to your insights.

Best regards,
Pawan

Timothy Wuthenow

unread,
Jan 31, 2025, 3:38:29 PM1/31/25
to Kogito development mailing list
Hi Pawan,

I'll start with the last part first. I'm not 100% familiar with Ubuntu, but I've been playing with it this week. In my home environment, I have personally had issues with my script going to Ubuntu, but I'm not 100% sure if its external reasons versus incompatibility at this time. In theory, you can use WSL to do a test on Windows with Shell. Just note there are several reasons this can be a challenge as Windows handles containers differently than Mac/Linux due to paths amongst other things. In the past when I've used WSL with compose, my paths had to be much more verbose to work. That said, it could work. I would typically try to stay away from Docker Compose as a production environment, but other than that, since it's a development tool, it's definitely worth pursuing.

If the task console is not populating data, are you stating that it's not receiving any tasks in the console or is it not having any process contents in the tasks that are there? These are very different issues and we would want to be sure we're aligned there. Can you check the Java Script console from the task console to see if there are any errors, typically when this occurs, its a communication issue between services that is caught in the browser level.

Let me know.
Tim

pawan saha

unread,
Jan 31, 2025, 4:51:41 PM1/31/25
to kogito-de...@googlegroups.com, Pawan Saha
Hi Tim, Alex,
Thanks for your reply. I don't see any such abnormalities that will stop the task console to populate data.

Here are the details. 

UI - Javascript Console (no error)
image.png

UI - Network Logs (all response has 200 status) 
image.png

Task Console (Docker Logs)
image.png

Management Console
image.png

Also find the keycloak and postgres logs attached.


FYI - all Containers are running
image.png

Regards,
Pawan



keycloak.txt
postgres.txt

Timothy Wuthenow

unread,
Feb 1, 2025, 12:04:51 PM2/1/25
to Kogito development mailing list
Hi Pawan

Can you send me the logs of the compose coming up? I'd like to see the Task Console, the Management Console and the jBPM service.

Also I am almost done with this thing that I've put in my main like a jerk without a branch, but I was able to test the following repository in Fedora, Ubuntu, Mac, Windows and Windows Subsystem for Linux and all are working as expected. Can you try the same process with using https://github.com/timwuthenow/jbpm-compact-architecture-example and use the main (only branch).

The procedure for this one will be a little more observant, but I promise soon it might be worth it.
2) cd jbpm-compact-architecture-example
3) cd docker-compose
4) ./startServices.sh full or ./startServices.bat - the Windows version does not have the question of devcontainers, but answer yes or no to it if it comes. dev containers is asking if you are using codespaces on GitHub. I have almost finished this configuration as the communication between services in GitHub codespaces + the remote calls makes me think the proxies might block something.

If you can try this one let me know. I have worked with a few others this week to get the Windows version (as well as Ubuntu and others as well) in a slightly different format to include the keycloak server so that you have the full option to see security on the consoles.

The other question, it looks like you're using Edge as your browser. Can you see if Chrome repeats this same issue, if it is possible? Can you also get the Abouts on all of the services (Management, Task and Service)? Also the console I've noticed to see errors if I open it after the page is loaded won't capture an error, you often need to refresh the page when it is there.

Tim

pawan saha

unread,
Feb 1, 2025, 1:41:52 PM2/1/25
to kogito-de...@googlegroups.com
Hi Tim,
Thank you for the detailed procedure! I followed the below  steps you mentioned and cloned the repository successfully. After navigating to the docker-compose folder, I attempted to run the script using both ./startServices.sh full and ./startServices.bat full.

Steps:

The procedure for this one will be a little more observant, but I promise soon it might be worth it.
2) cd jbpm-compact-architecture-example
3) cd docker-compose
4) ./startServices.sh full or ./startServices.bat full - 

However, I encountered errors with the Management Console and Task Console not starting properly. It seems there might be an issue with their connectivity or configuration.

Management Console

image.png

Task Console:
image.png

Keycloak is running
image.png


All containers are running:
image.png


And regarding the repo porcelli/jbpm-compact-architecture-example, in this case, which we are  trying for the last few days, the Task Console data is not getting populated. I will send you the logs you asked for.


Regards,
Pawan Saha


pawan saha

unread,
Feb 1, 2025, 3:25:17 PM2/1/25
to kogito-de...@googlegroups.com
Hey Tim, Alex,
Please find the logs from all the containers.

Repo: porcelli/jbpm-compact-architecture-example   (These are the issues we have been working to resolve over the past few days)

Container Logs:     PFA

Issue: The Task Console data is not getting populated.

Task Console -  JS Console
image.png

Task Console - Network logs (here you can see a response with a status code 302)
image.png

details of response with 302 status
image.png


Regards,
Pawan

docker-logs.rar

pawan saha

unread,
Feb 5, 2025, 3:59:40 PM2/5/25
to kogito-de...@googlegroups.com
Thanks Tim and Alex. 
The task console is now working for me. Thanks again for all your help.

Regards,
Pawan

pawan saha

unread,
Feb 6, 2025, 3:17:54 AM2/6/25
to kogito-de...@googlegroups.com, Pawan Saha

Hi Tim, Alex,

I wanted to provide an update: 

everything seems to be working fine on Windows. 

However, when I ran the application on Ubuntu today, both the Management and Task Consoles are not populating data

Do you have any suggestions or insights?

Best regards,
Pawan

Pere Fernandez

unread,
Feb 6, 2025, 4:44:02 AM2/6/25
to kogito-de...@googlegroups.com, Pawan Saha
Sorry I missed this thread,

Pawan,when testing in your Ubuntu do you have any error in the browser console?

cheers,

Pere

Anoop Varambally

unread,
Mar 27, 2025, 1:35:45 AM3/27/25
to Kogito development mailing list
Hi Team,
I'm facing similar problem..

Management console working as expected.
But Task console not loading any data.. I dont see any error in browser console/network-tab/logs

Here is my compose conntent:
task-console:
container_name: task-console
restart: always
ports:
- 8380:8080
depends_on:
kogito-rich:
condition: service_started
keycloak:
condition: service_started
environment:
KOGITO_DATAINDEX_HTTP_URL: http://localhost:9001/graphql
KOGITO_JOBS_SERVICE_URL: http://kogito-rich:9001
KOGITO_SERVICE_URL: http://kogito-rich:9001
QUARKUS_HTTP_CORS_ORIGINS: "/.*/"
RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_ENV_MODE: "PROD"
RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT: "http://localhost:9001/graphql"
KOGITO_CONSOLES_KEYCLOAK_URL: http://localhost:8480/auth
RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_APP_NAME: "task-console"
RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_APP_VERSION:
KOGITO_CONSOLES_KEYCLOAK_REALM: "kogito"
KOGITO_CONSOLES_KEYCLOAK_CLIENT_ID: "kogito-console-quarkus"
KOGITO_CONSOLES_KEYCLOAK_DISABLE_HEALTH_CHECK: "false"


port 9001 where my kogito application running..

Am I missing something?

Thank you in advance..

Regards,
Anoop
Reply all
Reply to author
Forward
0 new messages