If you check the JUnit tests, org/jbpm/jpdl/par/ProcessArchiveDeploymentDbTest.java has examples on how to build a simple .par, as well as deploy it.
ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream("your/par/file/name/here")); ProcessDefinition processDefinition = ProcessDefinition.parseParZipInputStream(zipInputStream); jbpmContext.deployProcessDefinition(processDefinition);
You just need to worry about getting the PAR from machine A to machine B. You could do it as a HTML Multipart Post, or FTP, or however you want. Anyway to get the file physically to the other machine (with a known path) is the pain point of your issue.
So there is not an MBean whose JMX interface includes methods for deploying a PAR. I was hoping I could create a remote JMX connection to the MBean and get it to machine B that way. Is there an MBean that can do this or would I have to write my own.
According to the FAQ in the Wiki:
Does jBPM have JMX integration and if so, how does it look like?
In the starters-kit, jBPM comes deployed as an MBean. But for the moment, this mbean is only used to put the JbpmConfiguration? in JNDI. No properties or management operations are available yet on this MBean.
My plan then is to write my own mbean that I can access remotely via JMX to deploy a PAR. Thanks for the info.
You can leverage the deployment servlet in the jBPM webapp if you like... But I agree that an MBean could be a better solution. Let us know if you are planning to contribute ;-)
I've been looking for a way to do the deployment of .esb archives into server/default/deploy directory of JBoss AS running JBossESB inside or JBossESB server, but I didn't find anything related.
Please, nnelgp, did you make your MBean?
I think it could be useful to deploy other kinds of archives into JBoss * servers.
If you made something, please, tell us.
Thanks in advance!
Your use case is unrelated to jBPM itself. You should have posted to the ESB forum instead.
Anyway, the ESB registers its own deployer in JBoss AS to handle files with the .esb suffix. By doing so, it leverages the existing deployment infrastructure. You can call operations on the main deployer MBean (object name: jboss.system:service=MainDeployer) to deploy modules of any kind known to the deployer.
jBPM does not use the main deployer because the lifecycle of process definitions does not match that of modules.