参考资料:
1.Flowable 学习笔记 https://www.jianshu.com/p/799b1ebf5dc4?tdsourcetag=s_pctim_aiomsg
2.Flowable中文文档 https://tkjohn.github.io/flowable-userguide/#_introduction
3.Flowable英文文档 https://www.flowable.org/docs/userguide/index.html
前公司用过自行开发的工作流LBPM(Longrise Business Process Management),总体思想还是那一套。
一、怎么画工作流
1.手写BPMN 2.0 XML 文件,这种用来做小修改还行,画大图不太适合
2.借助工具,目前有两种
Eclipse的 Flowable Designer插件或Flowable Web Modeler的war包
Eclipse的 Flowable Designer插件安装
要求版本 Eclipse Mars或Neon
安装方法
选择Help → Install New Software。在下图面板中,点击Add按钮,并填写下列字段:
Name: Flowable BPMN 2.0 designer
Location: http://www.flowable.org/designer/update/
Flowable Web Modeler的war包
下载地址:https://www.flowable.org/downloads.html
最新jar包下载地址:https://github.com/flowable/flowable-engine/releases/download/flowable-6.4.2/flowable-6.4.2.zip
镜像下载:https://download.csdn.net/download/softcm/
5个war包放一起部署,不能缺
直接放tomcat
http://localhost:8080/flowable-task
http://localhost:8080/flowable-modeler
http://localhost:8080/flowable-idm
http://localhost:8080/flowable-admin
http://localhost:8080/flowable-rest/docs
设计器登陆http://localhost:8080/flowable-modeler
用户名密码全部都是admin/test
Flowable Modeler:流程定义管理
Flowable Task:用户任务管理
Flowable IDM:用户组权限管理
Flowable REST API:流程引擎对外提供的API接口
Flowable Admin:后台管理
二、war包改造用自己的表
若报如下错误
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
三、有哪些表
注意:表的个数随版本增长,21张->25张->34张(Flowable BPMN v6.3.0)->38张(Flowable BPMN v6.4.2)
具体表含义和字段含义可参考:https://blog.csdn.net/zhongzk69/article/details/
四、手册5.7.4节REST 支持替代方案
这一节有不少curl命令,这个命令在windows下支持的不是很好,实际上可用postman替代
五、手册7.3.7添加任务清单添加用户替代方案
7.3.7添加任务清单有bug,需要用代码添加用户,页面添加的用户无法搜索和加入组,代码如下
package org.flowable; import org.flowable.engine.IdentityService; import org.flowable.engine.ProcessEngine; import org.flowable.engine.ProcessEngines; import org.flowable.idm.api.User; public class FinancialUser { public static void main(String[] args) { ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine(); IdentityService identityService = processEngine.getIdentityService(); newUser(identityService); } private static void newUser(IdentityService identityService) { //添加kermit用户 User user = identityService.newUser("kermit"); user.setPassword("kermit"); user.setEmail(""); user.setFirstName("kermit"); user.setLastName("Admin"); identityService.saveUser(user); //添加fozzie用户 User user2 = identityService.newUser("fozzie"); user2.setPassword("fozzie"); user2.setEmail(""); user2.setFirstName("fozzie"); user2.setLastName("Admin"); identityService.saveUser(user2); } }
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/225497.html原文链接:https://javaforall.net
