摘要:flowable使用mongodb,flowable集成mongodb,flowable如何使用mongodb
Flowable为啥看上了MongoDB
Activiti差不多2013年就有了,Flowable差不多2016年就有了。为啥期间没有使用MongoDB。那MongoDB是啥时候出现的。2009年2月开源数据库MongoDB 1.0正式面世。
2018年6月, MongoDB推出ACID事务支持,成为第一个支持强事务的NoSQL数据库
既然支持了ACID事务,于是乎Flowable开始默认集成了MongoDB。
MongoDB下载
MongoDB下载地址:https://www.mongodb.com/download-center/community。
MongoDB启动
./mongod --port 27017 --bind_ip_all --dbpath ../
./mongo
Flowable MongoDB包
在pom.xml中添加如下依赖
Flowable MongoDB使用
ProcessEngine processEngine = new MongoDbProcessEngineConfiguration()
.setServerAddresses(Arrays.asList(new ServerAddress("127.0.0.1", 27017)))
.setDisableIdmEngine(true)
.buildProcessEngine();
System.out.println(processEngine);
执行上述代码之后,会生成如下的几个document.