How to Auto-Deploy a bpmn model to APS

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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

2 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