首页 > 其他 > 详细

flowable 通过模型model ID部署流程

时间:2021-06-06 10:01:53      阅读:25      评论:0      收藏:0      [点我收藏+]
	/**部署流程定义
	?*/
	@RequestMapping(value="/deployment")
	@RequiresPermissions("fhmodel:edit")
	@ResponseBody
	public?Object?deployment(){
		Map<String,Object>?map?=?new?HashMap<String,Object>();
		String?result?=?"success";
		PageData?pd?=?new?PageData();
		pd?=?this.getPageData();
		try{
			deploymentProcessDefinitionFromUIModelId(pd.getString("modelId"));//部署流程定义
		}catch?(Exception?e){
			result?=?"error";
		}finally{
			map.put("result",?result);
		}
		return?map;
	}

/**部署流程定义(根据ui.modeler的?modelId部署)
	?*?@param?modelId?模型ID
	?*?@return?部署ID?项目源码www.fhadmin.org
	?*/?
	protected?String?deploymentProcessDefinitionFromUIModelId(String?modelId)?throws?Exception{
		Model?model?=?modelService.getModel(modelId);
		BpmnModel?bpmnModel?=?modelService.getBpmnModel(model);
		Deployment?deployment?=?repositoryService.createDeployment()
		.name(model.getName())
		.addBpmnModel(model.getKey()?+?".bpmn",?bpmnModel).deploy();
????????return?deployment.getId();	//部署ID
	}


flowable 通过模型model ID部署流程

原文:https://blog.51cto.com/u_14622073/2871610

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!