agrz opened a new issue, #7015: URL: https://github.com/apache/incubator-kie/issues/7015
We encountered a problem with starting Kogito (BPMN) processes via a messaging event when the processId contains a dot. We use the 2.44.1-alpha verison with Springboot, but looking into the code the issue is still relevant and for Quarkus too. We use processIds with dots to separate different process domains like in many of the Kogito examples. Like in the onboarding sample you have processes onboarding.setupHR and onboarding.setupPayroll. When trying to add there a message-start event, the generated code will compile but service will fail on the autowiring process. The reason is that the process beans are generated as named component with the full processId including dots by the ProcessGenerator code [here](https://github.com/apache/incubator-kie-kogito-runtimes/blob/2e96c763307825d9710969d0bccd26534ad168d5/kogito-codegen-modules/kogito-codegen-processes/src/main/java/org/kie/kogito/codegen/process/ProcessGenerator.java#L395). But in the MessageConsumerTemplate a process name is used in the [Qualifier](https://github.com/apache/incubator-kie-kogito-runtimes/blob/2e96c763307825d9710969d0bccd26534ad168d5/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/MessageConsumerSpringTemplate.java#L37) to wire the right process. The problem is then that the process name is using only the name after the [last dot](https://github.com/apache/incubator-kie-kogito-runtimes/blob/2e96c763307825d9710969d0bccd26534ad168d5/kogito-codegen-modules/kogito-codegen-processes/src/main/java/org/kie/kogito/codegen/process/MessageConsumerGenerator.java#L92) When the injection happens in the runtime, it fails as the qualifier name does not match the registered bean name. When manually changing the generated code and add in the qualifier the full process Id, it works as expected. The fix may be easy to modify the MessageConsumerGenerator to pass the processId into the template instead of the stripped of name. But maybe there is a reason for the MessageConsumerGenerator is done right now and we miss something? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
