Is it possible to use flowable as an embeddable library in plain Java app?

I have this use case where I want to be able to use flowable as a library in my Java app. I imagine something like constructing a custom bpmn on the fly, programmatically in the app and then submitting that to flowable.

My questions are:

  1. Is it possible to use flowable engine like this?

  2. If yes to (1), would I need to stand up a database server also or can flowable use some in-memory data structure itself, because ideally I would want to make my Java app a binary with no dependencies on any external server/service.
    

I already read this: Using Flowable as an embedded workflow but the main difference is: I’m not using a spring boot app to embed flowable, mine is just a simple Java CLI app and I don’t want to use a database server as another dependency, looking to know if something in-memory can suffice for flowable?

The user guide contains an example using nothing but vanilla java and Flowable as a dependency.

https://www.flowable.org/docs/userguide/index.html#getting.started.command.line

Flowable is also able to utilize an in memory database like h2 instead of a full fledged relational database like Postgres. You lose some of the features that make Flowable so awesome, like the ability to scale horizontally (since in memory databases aren’t shared between instances), auditability, and resilience in case of a crash (since in memory databases reinitialize on restarts). If your use case can handle the limits, you should be ok.

Will