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
534 stars 206 forks source link

Quarkus Kogito Processes Deps clarity #1906

Closed StephenOTT closed 2 years ago

StephenOTT commented 2 years ago

Description

The examples bring in the full kogito main dep.

But there is also: kogito-quarkus-processes.

Should process apps be able to be built using:

 <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-jackson</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-quarkus-processes</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-openapi</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-junit5</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>rest-assured</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-health</artifactId>
    </dependency>

or must

<dependency>
  <groupId>org.kie.kogito</groupId>
  <artifactId>kogito-quarkus</artifactId>
</dependency>

be used?

If your kogito-quarkus always required, is there simplified deps planned so you are not bringing in everything?

Thanks

Implementation ideas

No response

fjtirado commented 2 years ago

Lets explain the dependecies (I will skip test scope ones) used You allway need to include

 <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-quarkus</artifactId>
    </dependency>

if you are using processes and deccisions, rules or predictions or

<dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-quarkus-processes</artifactId>
    </dependency>

if you are just using processes. Note that this is intended for granularity. With the same spirit, then, if you are using REST, which is enable by default (but might be disabled), you also need

 <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-jackson</artifactId>
    </dependency>

And thats it. if example is using event messaging, it will have the additional addons includes as explained in this messaging post The same rationale, adding suitable addons, applies when enabling persistence.

 <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-openapi</artifactId>
    </dependency>

is only needed if you are using openapi, which is, as far as I know, only used for serverless workflow (so basically it can be probably removed from your example

  <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-health</artifactId>
    </dependency>

is included to retrieve health statistics.