User development,
A new message was posted in the thread "Does anyone know how to deploy
ProcessDefintion in JBPM 4.2":
http://community.jboss.org/message/524735#524735
Author : Andrius Miasnikovas
Profile :
http://community.jboss.org/people/andriusms
Message:
--------------------------------------------------------------
Hi,
I'm not sure that it's possible to do this with only the jbpm4 library. Personally
I've seen this kind of process definition construction only in jbpm4 tests. What you
could do is start your constructed definition like this:
ClientProcessInstance processInstance =
processDefinition.createProcessInstance();
processInstance.start();
someone will correct me if I'm wrong, but I think the repository service with which
you could deploy the process from an XML file doesn't seem to support process
deployment from the definition object. To deploy the process from a file you can do this
ProcessEngine processEngine = new
Configuration().setResource("your.jbpm.cfg.xml").buildProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
NewDeployment deployment = repositoryService.createDeployment();
deployment.addResourceFromClasspath("process.jdpl.xml");
deployment.deploy();
I'm assuming the usage of JPDL language here. To deploy the process from the process
definition builder you would need another step to convert that object into XML file that
defines it, but I can't answer how to do that, because I never tried. Usually
processes are pretty static so in most cases you should be able to create an XML file of
the process and then you could deploy it.
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/524735#524735