1、创建流程
/**
* 创建流程
* @param pathXml
* @param
* @return
*/
@Transactional
public String init(String pathXml, String collectionId, String name, String type){
//读取资源文件
Deployment deployment = repositoryService.createDeployment()
.addClasspathResource("flowable/"+pathXml)
.deploy();
ProcessDefinition processDefinition
=repositoryService.createProcessDefinitionQuery()
.deploymentId(deployment.getId())
.singleResult();
//获取存在数据库的审核人信息
FlowSpecify flowSpecify = flowSpecifyRepository.findAllByName(processDefinition.getKey());
//传入参数
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("collectionId",collectionId);
variables.put("type",flowSpecif