Hello Seán,
Thanks for the long answer.
Bonita’s IDs and mine have exactly the same purpose, this is why I wondered how to unify them. PersistenceID identify the row, exactly like my ‘id’ column, the next value is provided by a sequence, and the xxx_pid columns are the foreign keys to linked rows exactly like my fk_xxx_id columns. This is a common database design.
BTW, the database is PostgreSQL.
I should have been more specific about why I wish to use Bonita’s “business data” instead of accessing the data through a connector, maybe there is another solution to the problem.
What I did so far (and it was done with Bonita 6.5, when Business Data was not available in the Community version), is to define process variables for my data, including custom objects for the complex types, and implement a connector to access the database and provide the custom objects.
On each task where it is relevant, I use an entry connector to fill/update the process variables, then the task is active and the user can update the data using the task’s form, then the variables are saved to the DB through an exit connector.
The problem is that till the task is not performed, which can last for days, the process variables will not be updated, they are loaded in the task entry connector. If some data is updated in the database meanwhile, the workflow user will still work on old, outdated values.
If I use Bonita’s “business data”, these data are loaded from the database when the user opens the form, which is enough to solve the problem (there will not be ‘simultaneous’ concurrent updates while the user actually performs the task). But then I need to insure consistency between Bonita’s IDs and mine, both ways.
Maybe there are other solutions using Bonita 7.
I could implement a REST service to provide my custom “business data” to the form, then the question will be: how to save them. I am not sure if I can call easily a REST service directly from the form to save the data ? Or use a connector defined at the task level, after that the form is submitted, would be better ? In this case, I should not use Bonita’s “business data” at all, but keep my process variables, so that Bonita persistence will not interfere with mine (Bonita’s business data are automatically persisted if I understand well) ?
Thanks