welcome B.
I wont be able to give you a quarkus app; I dont have quarkus installed rn. if you can try, the steps for quarkus are very similar to sb. an annotation here and there. i can maybe try in a few weeks, but I have a couple large deliverables for work.
what we're trying to do here( allow retrieval of DMNs from locations other than resources folder) is absolutely possible with quarkus however, there is one major caveat with quarkus and drools-dmn. let me explain below, as i understand it.
if you look on line 24 of DecisionModels.java, you'll see the kogito generated code lists out all the DMNs in a static block.
static {
init(/* arguments provided during codegen */
null, null, readResource(Application.class.getResourceAsStream("/TrafficViolation-v2.dmn"), "UTF-8"), readResource(Application.class.getResourceAsStream("/TrafficViolation-v1.dmn"), "UTF-8"));
}
Why would kogito choose to list out the DMNs, and not iterate through the resources folder? it would seem that a retrieval of all DMNs in the resource directory would be a better design. less tight coupling to a set of DMNs. here is why, as i understand it.
when the DMNs are loaded into drools, there is drools code that does class introspection and reflection. (for both quarkus and sb)
quarkus does pre-compiling/AOT-complication of certain code to make the native executables start faster and take less memory than JVM. some of the code that quarkus pre-compiles is class introspection and reflection.
so, when using quarkus the list of DMNs you want to load into your executable..must be known at compile time.
this is why, the kogito team decided to put the list of DMNs to load in a static block, and listed out the dmn names explicitly.
so, if you choose to use kogito quarkus, every time you change the inventory of DMNs in your executable/app/container, you'll need to rebuild your container/app/executable.
now, with spring-boot, it does not have the pre-compile step. so you can write code to "read all DMNs from a directory" build your container, run your container .and if your inventory of DMNs changes, all you need to do is stop and start your container.
this is the first reason my team is using sb kogito/drools, and not quarkus. the second reason, is we've found (through extensive perf tests) that DMNs execute faster in spring boot- and that is a major criterion for us.
(granted, quarkus apps start up 20x faster than sb- but that wasnt a major criterion for us.)
(if Im incorrect, kogito team, please chime in.)