Maciej Swiderski [
http://community.jboss.org/people/swiderski.maciej] replied to the
discussion
"How to deploy bar files ?"
To view the discussion, visit:
http://community.jboss.org/message/537224#537224
--------------------------------------------------------------
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
[
http://community.jboss.org/message/537224#537224]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]