I have been going through all the threads, trying to find if my question has been answered. This thread is the closest!
I do have a similar requirement but with a twist of handling multiple versions.
Use Case:
DMNs are stored in git (feature based development). A 'release' git branch is maintained to handle its version (release-1.0.0, release-2.0.0)
During build all the dmn artifacts are validated and packaged in a jar and upload to Nexus. This means i have dmn-1.0.0.jar and dmn-2.0.0.jar for both the releases
I am taking Danielle's approach of adding DMNs dynamically to resources folder of the microservice as part of CI/CD process and leave kogito to generate rest endpoints/swagger openapi.json.
But my requirement needs microservice to support both the versions of the DMNs
Issue:
When I unzip the jar, as I have same dmn name and namespace in both the jars, one will override the other.
Approach:
For Example: if I have 'policies.dmn' with namespace 'org.sample.dmn' in dmn-1.0.0.jar. And a policy rule change in the same 'policies.dmn' causing it to have a new release 'dmn-2.0.0.jar'
I plan to play with the namespaces:
unzip dmn-1.0.0.jar and introduce a 'version' in the namespace org/sample/dmn/1_0_0 and then unzip the dmn-2.0.0.jar with org/sample/dmn/2_0_0 and so on... This way I have all the dmns in the same resource folder.
And as Mattio suggested explore DMNRuntimeBuilder and kie-dmn-openapi modules to generate rest endpoints/swagger openapi.json
Any suggestion?