Service task/Script task to upload all BPM input data in custom Postgre database

Greetings,

Is there any way to upload input data to database with above mentioned methods?

Required thing is, possibility to upload data (most likely field by field) into custom db and I did some research about it and I assume this thing can be done via Spring Bean but I’am not so familiar with it and I couldn’t find any related information about it.

Step by step guide would be appreciated.

Thanks is advance.

Hello,
I will try to help, but let me explain things and ask you some questions.

Data that you input into process forms (dialogs) are mostly stored in process variables.
Those process variables are then stored in the database structure that BPM engine uses for its work and storage.
The process engine used is Flowable, and if you look into your database, you can see the tables used to support it, they have prefix act_
The “act” comes from Activiti, from which Flowable was forked when the Flowable authors left Activiti. Conversely Activiti is a fork of jBPM.
The database table structure where Flowable stores process variables is designed to be resistant to process changes, e.g. one version of the process can have additional variables not present before, or change variable names etc… therefore it will save execution data and its variables as “master-detail”, something like Invoice has many items - so there will be process-variables and also process-tasks.

I assume you would like to make your own table in your postgres database, and store the process variables there, additionally.
Before doing that, you need to decide how will you store this variables, and make appropriate table or tables:

  1. you can mimic process engine history
  2. you can make table, and it contains a lob field (memo, clob, blob) and store the process variables as json or XML - this is a good way to be resistant to process variable changes, drawback is that reports or other applications need to be told how to interpret the changes and adjusted
  3. you can make a “classic” simple table, with fields corresponding to process variables, with option to make all this fields of string type or clob, which may make it easier later

Am I correct so far?