camunda工作流学习比较(2):发布流程

2019-12-31  本文已影响0人  嘻嘻xixii

集成camunda编辑工具

进入camunda官方网站https://camunda.com/下载camunda modeler流程编辑器

图片.png
图片.png
图片.png
打开idea集成编辑工具,File->Settings->Tools0>External Tools
图片.png

启动camunda modeler绘制流程

打开camunda modeler工具,绘制一个最简单的流程,并将流程文件保存到文件夹内


图片.png

发布流程

字符串

@Autowired
private RepositoryService repositoryService;    

public void publish(String bpmnXml, String fileName) {
    Deployment deployment = repositoryService.createDeployment().addString(fileName, bpmnXml)
            .deploy();
}

InpustStream

@Autowired
private RepositoryService repositoryService;    

@Override
public void publish(InputStream bpmnXml, String fileName) {
    Deployment deployment = repositoryService.createDeployment().addInputStream(fileName, bpmnXml)
            .deploy();
}

ZipInputStream

@Autowired
private RepositoryService repositoryService;    

@Override
public void publish(ZipInputStream zipInputStream) {
    Deployment deployment = repositoryService.createDeployment().addZipInputStream(zipInputStream).deploy();
}
上一篇下一篇

猜你喜欢

热点阅读