每一个UserTask都会在Execution表和Task表中各产生一条记录

一、创建流程引擎对象

   /**
     * 1、创建流程引擎对象
     */
    private ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();        

二、发布一个流程

 1     /**
 2      * 2、发布一个流程
 3      */
 4     @Test
 5     public void  testDeployProcess() {
 6         RepositoryService repositoryService = processEngine.getRepositoryService();
 7         DeploymentBuilder builder = repositoryService.createDeployment();
 8         // 加载发布资源
 9         builder.name("UserTask私有任务流程测试") // 设置流程显示别名
10                 .addClasspathResource("userSigleTask.bpmn") // 设置流程规则文件
11                 .addClasspathResource("userSigleTask.png"); // 设置流程规则的图片
12         // 发布流程
13         builder.deploy();
14     }
View Code

相关文章: