Alter DMN table by using service task

Hello eveyone,
How can I update DMN table automaticlly in camunda platform?
It is possible to that by using service task?

Thank You,

Hi @YazanAsaad,

to update a DMN table, it has to be deployed to the engine.

This can be done with a service task, too.

Hope this helps, Ingo

Hello @Ingo_Richtsmeier
I deployed that to Camunda cockpit with the BPMN model,
but how can i update that automaticlly by using Service Task,
which mean, if my DMN contains a number as an example and I want to update this number
automaticlly by using Service Task, how can do that? is there any code/ script that do?

Yazan,

You can use the camunda dmn model api to alter an existing table … but the api is close to xml and not very usable imho. Create a Model | docs.camunda.org

I have been working on an extension that allows a more java-like approach, but didn’t have the time to invest further during the last month … but maybe check it out: GitHub - holunda-io/camunda-decision: Extension for easier, type safe interaction with camunda dmn

1 Like

Hi @YazanAsaad,

to deploy the DMN in a service task you need to write

    execution.getProcessEngineServices()
      .getRepositoryService()
      .createDeployment()
      .addInputStream("dmn file name", Files.newInputStream(Path.of("My file path")))
      .deploy();

in your Java Delegate.

Hope this helps, Ingo