Hi, I am using Bonita BPM and i developed an API extension. I also added a postgres db storing business data (products and so), leaving to Bonita the process handling.
My environment involves two processes:
the main process
a subprocess
My issue is the following:
what’s the right way to trigger an update to my database each time the subprocess instance is completed? I would like to, say, change the state of the product involved in the subprocess.
From the documentation, I can’t get whether I should make use of a connector or a event handler, or something else.
If your “product” is stored using Bonita BPM Business Data feature the way to go is to define a service task at the end of the sub process and on the service task define an operation.
If you use an external database (not managed by Business Data) I suggest to use a database connector as recommended by Sean. Use the data source connector with a connection pool configuration to ensure performance.
Thank you antoine, I think a database connector is the win. I have now the issue of customizing my query based on the process variables. I explained it better answering Sean
Thank you Sean. I’m configuring the connector out for the final subprocess activity right now. How can i use the subprocess variables to customize my query? Let’s say i have a process variable “product_id” and i want to update the record like “UPDATE products SET state=‘completed’ WHERE product_id = (%product_id)”.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.