[jboss-user] [jBPM] - How to deploy bar files ?
Maciej Swiderski
do-not-reply at jboss.com
Tue Apr 13 12:13:27 EDT 2010
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&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100413/ad54acff/attachment.html
More information about the jboss-user
mailing list