I was not there when the decision was made to use MyBatis. However, what I can say is that MyBatis and Hibernate are entirely different beasts.
With MyBatis we have entire control over the SQL that gets sent to the DB, it is easily customizable based on a properties and we can provide different queries for different DBs. We are the ones that write the SQL that gets send over the wire and are not using an additional layer (like with Hibernate) in this case. We are not using the caching layer of MyBatis, we have our own caching layer for entities which we use to flush to the DB when the transaction commits. This is also highly optimised for our usecase, i.e. if we do an insert and then a delete in the same transaction we won’t send this instructions to the DB, think straight through process without wait state. The
DbSqlSession is where that magic happens.
Why would you need to change the data layer to Hibernate? Hibernate uses JDBC which is the same as MyBatis and any other ORM that would be used for relational databases that support JDBC.
The links from @pstapleton are good to see how the data persistence layer can be changed. I also agree with him that it will be a lot of work to bring it to the same level as the current MyBatis implementation.
However, if you are asking for hibernate / JPA support for storing variables, Flowable already has that support out of the box. You can use JPA entities as variables and those will be stored and loaded correctly from Flowable through the JPA EntityManager. Have a look at