apache / incubator-kie-kogito-runtimes

Kogito Runtimes - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
Apache License 2.0
542 stars 209 forks source link

Empty Constructor Call in Handler method being generated for Beans that inject other beans #3637

Open donndorf opened 2 months ago

donndorf commented 2 months ago

Describe the bug

Scenario:

Bean A Bean B

Bean B is being injected into Bean A Bean A is used in a BPMN service Task

Generating the code creates an Empty Constructor Call for Bean A. This leads to failure at application Startup because the Injected Bean B is required as Argument

I uploaded a small example here: https://github.com/donndorf/kogito-inject-empty-constructor

Expected behavior

Either Constructor being called correctly or Bean being fetched vie CDI /Quarkus Arc container

Actual behavior

Empty constructor called for Bean

How to Reproduce?

https://github.com/donndorf/kogito-inject-empty-constructor

  1. Checkout the project
  2. Run a mvn clean compile
  3. run the Test and check the Terminal for Errors

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)

10.0.999-SNAPSHOT

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

No response

Additional information

No response