数据库表流程模板配置
配置流程模板信息
流程模板配置的有三张表,分别为流程模板配置表、流程任务模板配置表、产品流程配置表。
流程模板配置表 tb_wfm_process_mapping
此表信息为流程引擎推送,不需要进行配置。
需要关注的字段:
- template_name : 流程模板名称。
- template_version: 版本号。
- process_mapping_id: 流程映射id。
- 关联tb_wfm_workitem_mapping的process_mapping_id,查询所有流程节点配置信息。
流程任务模板配置表 tb_wfm_workitem_mapping
通过流程模板配置表的process_mapping_id和流程任务模板配置表的process_mapping_id关联, 查询所有流程节点配置信息。
此表信息为流程引擎推送,全表只需要配置两个字段:
- wm_post_cd : 节点对应岗位。
- user_variable: 节点人员对应变量。
需要关注的字段:
- process_mapping_id : 流程映射id。
- rule_id: 规则id。
- 规则id由流程引擎推送,有值需要配置节点人员对应变量(user_variable)字段。
- user_variable: 节点人员对应变量。
- 该字段需要配置哪些参数是由流程引擎通知,以逗号分割形式配置。
- 该字段是流程节点回调初始化方法返回的参数。
- wm_post_id: 节点对应岗位。
- template_name: 模板名称。
- template_version: 版本号。
- act_action: 节点对应功能(1: 提交 2: 退回 3: 撤销 4: 拒绝)。
- act_id: 节点id。
产品流程模板配置表 tb_wfm_product_mapping
根据业务大类、业务类型、产品字段配置流程模板。
需要关注的字段:
1、busi_big_type: 业务大类。
2、busi_type: 业务类型。
(1) tb_pub_dic_sub(字典明细表),码值为PUB_BUSI_TYPE查到。
3、product_cd: 产品号。
4、template_name: 流程模板名称。
(1) 如果流程模板名称后面带-v,需要配置流程规则编号(rule_no)字段值”edxdPub1001”。规则引擎根据机构、机构类型、机构级别判断是否是信贷或小贷机构,走对应的流程图。

1.1.3 流程模板图
5、tree_module_cd: 动态树编号。
(1) 动态树编号(tree_module_cd)字段为流程发起左树右表的树名称,如果流程树页签需要判断动态显隐,需要在树名称后面加@和子系统名称。例如:loanTree@loan。
配置左树右表信息
左树右表主表 tb_pub_module_menus
module_cd: 资源编号。根据module_cd关联tb_pub_module_menus_info 的module_cd,查询树的所有页签信息。

左树右表明细表 tb_pub_module_menus_info
tb_pub_module_menus 的module_cd和tb_pub_module_menus_info 的module_cd关联,根据module_cd可以查询树的所有配置信息。如果树页签需要在某些场景下动态显隐,需要配置checkType(检查类型)、checker(检查其信息)、ischecked(是否自检)字段。
checkType(检查类型): A:后台方法 R:规则 M:规则组。
checker(检查其信息):
- 后台方法: 接口类名#方法名
- 规则: 规则编号
- 规则组:规则组编号
ischecked(是否自检):
1、0: 否 1:是
2、如果值为否,checkType(检查类型)和checker(检查其信息)则不生效
Java后台
system_trees.xml配置
流程节点回调方法需要在公共子系统system_trees.xml进行配置。
| 参数key | 参数名称 | 说明 |
|---|---|---|
| id | Id | 在system_trees.xml里id值不能重复 |
| result | 回调方法 | |
| productCd | 产品号 | |
| busiType | 业务类型 | |
| serviceType | 服务类型 | 1:流程结束,2:流程撤销,3:流程拒绝,4:流程节点初始化,5:流程提交 |
| nodeNo | 节点编号 | 流程节点 |
<!--流程结束--><group id="G4102410201\_11" result="http://easyloan-badassets/tbBadNplTurnover/finalTurnInfo"><grade name="productCd" diffType="1" value="410201"/><grade name="busiType" diffType="1" value="4102"/><grade name="serviceType" diffType="1" value="1"/><grade name="nodeNo" diffType="1" value=""/></group><!--流程撤销--><group id="G4102410201\_21" result="http://easyloan-badassets/tbBadNplTurnover/cancelTurnInfo"><grade name="productCd" diffType="1" value="410201"/><grade name="busiType" diffType="1" value="4102"/><grade name="serviceType" diffType="1" value="2"/><grade name="nodeNo" diffType="1" value=""/></group><!--流程拒绝--><group id="G4102410201\_31" result="http://easyloan-badassets/tbBadNplTurnover/rejectTurnInfo"><grade name="productCd" diffType="1" value="410201"/><grade name="busiType" diffType="1" value="4102"/><grade name="serviceType" diffType="1" value="3"/><grade name="nodeNo" diffType="1" value=""/></group><!--流程初始化-usertask1--><group id="G4102410201\_41\_usertask1" result="http://easyloan-badassets/tbBadNplTurnover/nplInitProcess"><grade name="productCd" diffType="1" value="410201"/><grade name="busiType" diffType="1" value="4102"/><grade name="serviceType" diffType="1" value="4"/><grade name="nodeNo" diffType="1" value="usertask1"/></group><!--流程初始化--><group id="G4102410201\_41\_usertask3" result="http://easyloan-badassets/tbBadNplTurnover/nplInitProcess"><grade name="productCd" diffType="1" value="410201"/><grade name="busiType" diffType="1" value="4102"/><grade name="serviceType" diffType="1" value="4"/><grade name="nodeNo" diffType="1" value="usertask3"/></group><!--流程提交-节点1--><group id="G4102410201\_51\_usertask1" result="http://easyloan-badassets/tbBadNplTurnover/submitTurnInfo"><grade name="productCd" diffType="1" value="410201"/><grade name="busiType" diffType="1" value="4102"/><grade name="serviceType" diffType="1" value="5"/><grade name="nodeNo" diffType="1" value="usertask1"/></group>
system_small_trees.xml
小贷流程节点回调方法配置,和system_trees.xml配置一样。如果没有配置,小贷机构发起的流程没有回调方法。
流程发起
Feignclient里添加访问公共子系统流程发起接口
@PostMapping(“/workflow/start”)
public PageData start(
@RequestBody
@ApiParam(name = “pd”,value = “发起流程配置信息”)
PageData pd) throws Exception;
Service实现类添加依赖注入
@Resource
private WorkFlowFeignClient workFlowFeignClient;
发起流程需要传给流程引擎的固定参数信息。
//发起流程PageData pageData = new PageData();
// 业务编号
pageData.put(“businessKey”, pd.get(“uuid”));
// 客户编号
pageData.put(“customerNum”, application.get(“cusNo”));
//客户名称
pageData.put(“customerName”, application.getString(“cusName”));
// 业务产品
pageData.put(“productCd”, application.get(“productType”));
// 业务类型
pageData.put(“businessType”, “2107”); // 公共子系统用不到
pageData.put(“busiType”, “2107”);
pageData.put(“businessSuperType”, “4”);
// 法人机构
pageData.put(“bankCode”, application.getString(“bankCode”));
PageData responseData = workFlowFeignClient.start(pageData);
业务类型busiType字段在tb_pub_dic_sub(字典明细表),码值为PUB_BUSI_TYPE查到。
businessSuperType字段在在tb_pub_dic_sub(字典明细表),码值为PUB_BUSINESS_TYPE查到。
前端
前端左树右表组件
1、引入左树右表组件,注册。
importTreeFormDialogfrom’@/views/components/TreeFormDialog.vue’
components:{ TreeFormDialog }
2、页面引用
<TreeFormDialogref\=”TreeDiog”:need-ref\=”true”:tap-close\=”treeClose”/>
- need-ref: 是否刷新。
- tap-close: 关闭树弹框的回调方法。
3、Js方法打开左树右表弹框
this.$refs.TreeDiog._getDataFun(‘contractTree@loan’)

前端开发判断获取sessionStorage的uuid顺序问题
进入左树右表入口有发起业务流程页面、查看页面、和待办列表。
发起流程必须要先清除待办入口缓存
页面打开树前把uuid存入sessionStorage
// 发起流程必须要先清除待办入口缓存
sessionStorage.removeItem(‘WORKFLOW_RESPONSE_KEY’)
sessionStorage.setItem(‘uuid’,row.uuid)
constobj>
businessKey:row.duebillNum,
moduleCd:’loanTreeOnlyRead@loan’
}
this.$refs.TreeDiog._getDataFun(obj)
页面初始化获取缓存uuid, 根据uuid查询赋值页面。
//判断是否从待办入口
constkey>getItem(window.WORKFLOW_RESPONSE_KEY)
if(key){
if(JSON.parse(key)){
` // 获取uuid查询后台
…
}
}else{
const uuid = sessionStorage.getItem(‘uuid’)
}
