Community

How to deploy bar files ?

reply from Maciej Swiderski in jBPM - View the full discussion

Hi,

 

you could use following code to deploy it directly assuming that process engine is already configured:

 

    NewDeployment deployment = repositoryService.createDeployment();
 
    deployment.setName(processFile.getName());
 
    deployment.setTimestamp(System.currentTimeMillis());
 
    if (processFile.getName().endsWith(".xml")) {
 
      deployment.addResourceFromFile(processFile);
    } else if (processFile.getName().endsWith("ar")) {
        FileInputStream fileInputStream = new FileInputStream(processFile);
 
        ZipInputStream zipInputStream = new ZipInputStream(fileInputStream);
 
        deployment.addResourcesFromZipInputStream(zipInputStream);
 
    } 

Where processFile is File instance representing your process.

 

HTH

Maciej

Reply to this message by going to Community

Start a new discussion in jBPM at Community