Hi,
I am new to flowable, I used the below Java code to create and deploy the DMN Programmatically,
But i don’t know how to retrieve the same as JSON ( In DB JSON is stored as XML for my requirement i need to retrieve as JSON),
Is there any way to retrieve the deployed DMN as JSON, Can anyone please help me here ?
Just to be clear. It’s good to know the difference between the JSON and XML models.
The JSON represents the DecisionTable (or DecisionService) in the DecisionTable (or Service) Editor.
When deployed this editor model is transformed to DMN XML (conforming to the DMN spec).
So when you want to create the DMN model programatically it is not necessary to first create the JSON (editor) model. You can omit that step and create the DMN model directly.
But if there is somehow the requirement to transform the DMN XML to the Editor JSON this can be done like this.
Get the DmnDecision; f.e. DmnRepositoryService.getDmnDefinition(String decisionId)
Convert to JSON; DmnJsonConverter.convertToJson(DmnDefinition model)