How to create DMN Decision Table XML through Java?

Hello Everyone,

I want to create a DMN Decision Table XML (ie. .dmn file) through Java Code. I got this link [https://docs.camunda.org/manual/latest/user-guide/model-api/dmn-model-api/create-a-model/].

I want to write java code as mentioned in the link. What maven dependencies have to add to get all packages related to do XML creation. Orlse is there any spring boot dependencies to include.

I also want to know whether any kind of complex decision table xml can be created through code?

Could you advise on how to do this?

Thank you!

Hi @subash6095,

To create a DMN Model programatically(Java), then camunda-dmn-model dependency is required. You can use version 7.12.0 which is current stable versions.

If you’re using Maven as build tool, add the below dependency to the pom.xml:

<dependency>
    <groupId>org.camunda.bpm.model</groupId>
    <artifactId>camunda-dmn-model</artifactId>
    <version>7.12.0</version>
</dependency>

If you’re using gradle as Gradle as build tool, add the below dependency to the build.gradle:

compile group: 'org.camunda.bpm.model', name: 'camunda-dmn-model', version: '7.12.0'

To create a DMN Model with Java api refer this page: https://docs.camunda.org/manual/latest/user-guide/model-api/dmn-model-api/create-a-model/

2 Likes

Thank you so much @aravindhrs.