Hello,
I already have a workflow engine without a user interface to draw BPMN graph and I am using / testing flowable-modeler to see if I can integrate it with my web app.
I setup the flowable-modeler to read / write into my Sql Server 2005 and it works.
I notice that the graphs are stored into model_editor_json column of the table ACT_DE_MODEL.
It hard to read and I want to know if there is any way to parse or convert the json string to a .BPMN format, since in my web app I’m able to read .BPMN format and store the info in my db.
My idea is to create a Sql Server trigger that read ACT_DE_MODEL and stores info in my db.
You will need some Java logic for this:
You can use the convertToBpmnModel method of the org.flowable.editor.language.json.converter.BpmnJsonConverter
class of the flowable-json-converter
module to convert the JsonNode to a BpmnModel (see https://github.com/flowable/flowable-engine/blob/81707938d090c1a598c84af30107c2e61556c9a4/modules/flowable-json-converter/src/main/java/org/flowable/editor/language/json/converter/BpmnJsonConverter.java#L446).
That BpmnModel can be converted to BPMN 2.0 xml using the convertToXml method of the org.flowable.bpmn.converter.BpmnXMLConverter
class in the flowable-bpmn-converter
module (see https://github.com/flowable/flowable-engine/blob/81707938d090c1a598c84af30107c2e61556c9a4/modules/flowable-bpmn-converter/src/main/java/org/flowable/bpmn/converter/BpmnXMLConverter.java#L488)
Thank you Joram,
now I used the war. There is any way to modify the saving method of the modeler so it will save also the .bpmn format?
I tried the same but there was null pointer exception, can you share the steps how you did it?
will be a great help