Loading a BPMN Meta-Model NOT from XML - best approaches

Hi!

I’m new in bpmn.io community. I need to work on a project involve a bpmn model that not saved in XML files but in a database tables (start events, tasks, process, gateways, etc).

So when I read the http://bpmn.io/toolkit/bpmn-js/walkthrough/ explain that you have two libraries:
-moddle
-moddle-xml

So, If I want lo load a bpmn model direct from database tables (without parsing first to bpmn xml string) what is the best approach to do it?

Thnks in advance,
LDM

You could use moddle and instead of using moddle-xml build your own parser. How do persist a process in your database?

You could use moddle and instead of using moddle-xml build your own parser.

Ok, thnks, I think that too. Perfect.

How do persist a process in your database?

The same way backwards. Maybe if they are json objects could avoid save bpmn files and saved those objects in the database?

The other approach is to migrate all the database bpmn objects to bpmn files; and then use the bpmn framework as it is.

Thnks!
LDM

You can also use other approach to solve this problem. You can write a server-side Java application, which will be able to convert the information from your database to BPMN 2.0 XML format and backwards. There is a convenient library for this, check it out: https://github.com/camunda/camunda-bpmn-model.

Here is some useful guides:
https://docs.camunda.org/manual/7.3/guides/user-guide/#bpmn-model-api-creating-a-model
https://docs.camunda.org/manual/7.3/guides/user-guide/#bpmn-model-api-reading-a-model

2 Likes