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
491 stars 192 forks source link

Review ProcessService inject into management addon to avoid UnsatisfiedResolutionException when a project doesn't have a bpmn/serverless workflow file #3473

Closed ricardozanini closed 2 months ago

ricardozanini commented 2 months ago
          Folks, this PR broke the SonataFlow builder/devmode images:
2024-04-11 19:38:43,504 3161eb1b5bd6 ERROR [io.quarkus.deployment.dev.IsolatedDevModeMain:156] (main) Failed to start quarkus: 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: jakarta.enterprise.inject.spi.DeploymentException: jakarta.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type org.kie.kogito.process.ProcessService and qualifiers [@Default]
        - java member: org.kie.kogito.process.management.ProcessInstanceManagementResource#processService
        - declared on CLASS bean [types=[java.lang.Object, org.kie.kogito.process.management.ProcessInstanceManagementResource], qualifiers=[@Default, @Any], target=org.kie.kogito.process.management.ProcessInstanceManagementResource]

The culprit is this change: quarkus/addons/process-management/runtime/src/main/java/org/kie/kogito/process/management/ProcessInstanceManagementResource.java

The ProcessService bean is not available. Since these images start with an empty project, I think this injection dependency is not found. I might be wrong, I haven't dug enough.

Can we make this injection optional?

Originally posted by @ricardozanini in https://github.com/apache/incubator-kie-kogito-runtimes/issues/3403#issuecomment-2050490871

ricardozanini commented 2 months ago

See the proposal implementation here: https://github.com/apache/incubator-kie-kogito-runtimes/pull/3403#issuecomment-2051350279

ricardozanini commented 2 months ago

@elguardian why did you reopen it? Is the bug stills there? 🤔

elguardian commented 2 months ago

@ricardozanini There are more things linked to this and I don't know the context; I am not the owner so I leave to your criteria to close it.