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();
}
本作品採用《CC 協議》,轉載必須註明作者和本文連結