activi7流程部署

回眸只為那壹抹淺笑 提交于 2019-12-03 15:48:16
package com.zcc.acvitivi;import org.activiti.engine.ProcessEngine;import org.activiti.engine.ProcessEngineConfiguration;import org.activiti.engine.RepositoryService;import org.activiti.engine.repository.Deployment;/** * 流程定义部署 * 相关表: * act_re_deployment * act_re_procdef * act_ge_bytearray * */public class ActivitiDeployment {    public static void main(String[] args) {        //创建流程引擎配置类        ProcessEngineConfiguration processEngineConfiguration=                ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti.cfg.xml");        //流程引擎对象        ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();        //创建RepositoryService        RepositoryService repositoryService = processEngine.getRepositoryService();        //部署对象        Deployment deployment = repositoryService.createDeployment().                addClasspathResource("diagram/my2.bpmn")                .name("请假流程").deploy();        System.out.println(deployment.getId());        System.out.println(deployment.getKey());    }}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!