How to Auto-Deploy a bpmn model to APS

cancel
Showing results for 
Search instead for 
Did you mean: 
bgkoneill
Active Member

How to Auto-Deploy a bpmn model to APS

Hi Guys,

How can I auto deploy a process (bpmn model) into a docker container running the aps activiti app.

Currently I am developing against aps 1.9.  I build a jar with beans and then deploy it into an aps container using docker-compose.  The container for process is an extension of the existing alfresco/process-services:1.9.0.1 image provided by Alfresco.  

Is there a correct approach for auto-deploying the model.  For example, Can I put it on a specific classpath path within the jar?

Regards

Brian

3 Replies
bgkoneill
Active Member

Re: How to Auto-Deploy a bpmn model to APS

Hi Guys,

I am a little surprised that I got no response on this as it seems like a common request.  Simplifying the question,  is it possible in APS to autodeploy a model by, for example, putting it on the engine classpath?

Can anyone comment on this?

Regards

Brian

mdtabrezmca
Established Member II

Re: How to Auto-Deploy a bpmn model to APS

If you are using extension jar and wanted to deploy the process you can see this section Activiti User Guide  of activiti user guide. basically you need to use the following code to deploy the BPMN2 model. here you just need to place your model in the class path.

ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();RepositoryService repositoryService = processEngine.getRepositoryService();repositoryService.createDeployment()  .addClasspathResource("org/activiti/test/VacationRequest.bpmn20.xml")  .deploy();Log.info("Number of process definitions: " + repositoryService.createProcessDefinitionQuery().count());

Also refer the test case here

Activiti/DeploymentQueryTest.java at 6.x · Activiti/Activiti · GitHub 

jpotts
Professional

Re: How to Auto-Deploy a bpmn model to APS

Brian,

Did you ever come up with a successful approach for doing this? I need to do the same thing.

I suppose I could write an "automatic deployer" that would deploy whatever apps it finds in a particular directory, and then when I build the docker image I can copy the deployer JAR and the app to the image.

Maybe you found a better way?

Jeff