If I would store process instances in database, how can I start them?

Hi guys,
currently I’m using the Modeller to model new BPMN files and store them into my Eclipse workspace. Since I use Spring Boot, the files are auto-detected during bootstrapping and
they can be started using the runtimeservice.
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processName);

This works with BPMN files in the project file folder. But does this also work with BPMN files stored in a database table? Let’s say I want to store the BPMN files in a database table (e.g. CLOB field) rather than the file system, how would I than start a process instance?

Thanks
Roland

It works, because the bpmn files in the resources foulder are automatically deployed when the engine starts up.

I assume, you could your own startup hook, that reads your bpmn from the database and deploys them through the RepositoryService.

Cheers,
Stefan

Hi stefanzilske
yes, what you describe (building own startup hook) is exactly what I’m looking for. But currently I don’t know how to manage this. Has anyone some suggestions?
Cheers, Roland

Hi Roland,

you could write an own implementation of the AbstractProcessEnginePlugin where you could read (from you db) and deploy processes (with repositoryService) in the postInit method.

See also: https://docs.camunda.org/manual/7.5/user-guide/process-engine/process-engine-plugins/

Regards,
Patrick