Search code examples
processmaker

What is the best way to integrate data from ProcessMaker?


The question is relatively plain, but mainly directed to the ProcessMaker experts.

I need to extract batches of data from ProcessMaker to perform analysis later.

Currently, we have v3.3 which has database model documented very well, and not so well documented REST API. Having no clue on the best approach I suggest Process maker developers are encouraged to use direct database connection to fetch data batches.

However, from the perspective of the v.4 upgrade, I see that the database model is no longer a part of the official documentation, as well as the "Data Integration" chapter. Everything points out to use REST API for any data affairs.

So, I am puzzled. Which way to go for v3.3 and v4? REST API or direct DB connection?


Solution

  • ProcessMaker 4 was designed and built as an API first application. The idea is that everything that can and should be done through the application should be done via the API. In fact, this is the way all modern systems are designed. The days of accessing the database directly are gone and for good reason. The API is a contract. It is a contract that says that if you make a request in a certain way, you will get a certain response. On the other hand, we cannot guarantee that the database itself will always have the same tables. As a result if you access the database directly, and then we decide to change the database structure, you will be out of luck and anything you built that access the database directly will potentially fail.

    So - the decision is clear. V4 is a modern architecture built with modern tooling. It performs and scales better than V3. It is the future of ProcessMaker. So, we highly recommend using this versioning, upgrading and staying on our mainline, and using the API for all activities related to the data models.