Storage of DMN in database

Hi Folks,

I have a system requirement where in dynamic rules and combination of the rules will be defined at runtime from application screen. To achieve this functionality via DMN, I will have to dynamically create/modify/link multiple DMN XMLs and deploy them at runtime. However this will be time consuming from the aspect of production to deploy during runtime with multiple nodes running the process.

So my question, is there a way these DMNs can be stored in database during rules definition and retrieved from database during rule evaluation.

I appreciate your response and thank you in advance.

As of now Camunda has two tables for DMN engine,
https://docs.camunda.org/manual/7.15/user-guide/process-engine/database/database-schema/

I believe you are looking it from modeler and it’s not available.

However if you can store the file in DB of your choice, if you create dynamically and retrieve it later

You can take a look at it how to create dmn dynamically using java.

Hope this helps.

Hi @cpbpm

I appreciate your response. What I understand from it that there is a possibility to create DMN using application screen however to deploy I need to call API at path …/ generate_and_deploy. So typically in production environment where Camunda workflow could be deployed in multiple containers I will have to call this API for all the containers which is a time and resource consuming task. So I’m finding a solution around it.

Thank you.
Bhavesh G

I am thinking of work around as we don’t have tables to store DMN in DB.

If you stick the DMN file name unique and place it in shared drive accessible by all camunda container.

you can create ConfigMap to read the file using it in Camunda container.

Good thought @cpbpm . Thank you for your contribution

Hi @cpbpm ,

We also have similar requirement where we need to define dmn files from application.
So if we store file at common location and give that as Configmap path to camunda container, do we have to restart the camunda server after creating new dmn file at configmap location. Or is there any other way ?

isScanForProcessDefinitions i am not sure will this tag scan the dmn files automatically at the destination folder

Regards,
Ganesh

I would assume if the file is modified or added, restarting the container. I am yet to test that scenario.