flowable 从zip压缩包 部署流程定义

    /**部署流程定义(从zip压缩包)
     * @param name        //部署名称
     * @param zippath    //zip文件路径
     * @return 部署ID
     * @from  fhadmin.cn
     */
    protected String deploymentProcessDefinitionFromZip(String name, String zippath) throws Exception{
        File outfile = new File(zippath);
        FileInputStream inputStream = new FileInputStream(outfile);
        ZipInputStream ipInputStream = new ZipInputStream(inputStream);
        DeploymentBuilder deploymentBuilder = repositoryService.createDeployment();        //创建部署对象
        deploymentBuilder.name(name);                        //部署名称
        deploymentBuilder.addZipInputStream(ipInputStream);
        Deployment deployment = deploymentBuilder.deploy();    //完成部署
        ipInputStream.close();
        inputStream.close();
        return deployment.getId();                            //部署ID
    }
本作品采用《CC 协议》,转载必须注明作者和本文链接
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!