Dmn update event trigger

I have below need, please help me with suggestions/comments on the same:
I need to identify if the dmn has been changed/updated By someone, whenever that happens I need a process to recalculate something based on the changed dmn.
Thanks in advance.

You can implement a DmnTransformListener and register it on the configurationProcessEngineConfigurationImpl#getDmnEngineConfiguration().getTransformListeners().add()

Inside you find transformDecision*() methods that get called on deployment, so that’s where you could trigger execution of custom code. I cannot tell you by heart which of the methods is the correct hook for your use case, so you should debug/log them to find the correct one. And since the transform listeners will be called during the deployment transaction you will most probably need to execute your recalculation async, either by using a custom job or an onCommit() hook.

1 Like