zoukankan      html  css  js  c++  java
  • activiti7 读取bpmn文件部署流程

    try {
    //获取文件流
    File fileBpmn = new File('bpmn文件绝对地址');
    InputStream BpmnInputStream = null;
    try {
    BpmnInputStream = new FileInputStream(fileBpmn);
    } catch (IOException e) {

    }
    File fileSvg = new File('png/svg 文件绝对地址');
    InputStream SvgInputStream = null;
    try {
    SvgInputStream = new FileInputStream(fileSvg);
    } catch (IOException e) {

    }
    //1.创建ProcessEngine对象
    ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();

    //2.得到RepositoryService实例
    RepositoryService repositoryService = processEngine.getRepositoryService();


    //3.进行部署
    Deployment deployment = repositoryService.createDeployment()//创建Deployment对象
    .name('name')
    .key('')
    .category('')
    .tenantId("000000")
    .addInputStream(fileBpmn.getName(), BpmnInputStream)//添加bpmn文件
    .addInputStream(fileSvg.getName(), SvgInputStream)//添加png/svg文件
    .deploy();//部署
    log.info("name---" + deployment.getName());
    } catch (Exception e) {
    e.printStackTrace();
    }
  • 相关阅读:
    软件工程基础之二——阅读《软件工程基础》的问题
    软件工程基础之一——个人介绍与计划
    个人介绍
    sudoku
    GitHub地址
    疑问②
    概览提问①
    jsp内置对象
    tomcat的环境变量配置
    构造方法的重载代码
  • 原文地址:https://www.cnblogs.com/ggdxx/p/13400014.html
Copyright © 2011-2022 走看看