I want to use flowable as a bpmn tech in a spring boot app.
Do I need to configure flowable with a database? What do I gain from this or what could I lose if I don’t configure a database for flowable?
Currently flowable is picking up on my configured db and adds all the tables in my current schema which I don’t want because I want to control all database access.
Flowable uses a database as its state store, so one must be configured. It does this for a few reasons:
- Models are stored in the db so they don’t have to be deployed every time
- Flowable uses DB transactions to rollback when errors are encountered
- Async tasks are executed by inserting a job in the DB and then having an Async Executer pick it up at a later time.
- When multiple instances of the engine are used, Flowable uses the database as a single source of truth, using locking to ensure two instances don’t start the same job at the same time.
The Spring Boot auto-configuration will pick up your datasource by default, but you can change which datasource it uses. If you don’t need multiple instances and don’t care if data survives a reboot, you could add an H2 datasource, but I wouldn’t recommend it.