Remote deployment of jbpm-project from external repository

1k Views Asked by At

Have an external repository, that is an standalone application on the same VM, where is jbpm installed. Can deploy kjar from it to kie-workbench clicking New Deployment Unit, but would like to make it programmatically. What approache can you suggest? I've found two possibilities, one with kie-config-cli.sh, but unfortunately it doesn't seems work, the second with Rest Api with /maven/deploy command, but for this purpose it should be already created project on the kie-server, that's why I would like to avoid this one. 1. Regarding first approach: I am using kie-config.cli to 'add-deployment', enter all the same version, groupId and organisation, as I do it manually in kie-workbench itself, but nothing appears in kieworkbench (yes, settings.xml is aware about my external repository).

Thank you in advance!

Jbpm 6.4.0.Final at Wildfly 8.2.0, Apache Archiva 2.2.1 at Jetty

2

There are 2 best solutions below

0
On BEST ANSWER

It is there already a rest-api for this purpose: POST@ /rest/deployments/groupId:artifactId:version/deploy BODY: Header: Content-Type: application/xml

*settings.xml (maven) on the local machine, where it is to deploy, should be aware about your external repository as well as pom.xml should contain this information (and it will, if you deploy to it with 'mvn deploy')!

2
On

The KIE Server allows for full lifecycle of it.

the second with Rest Api with /maven/deploy command, but for this purpose it should be already created project on the kie-server, that's why I would like to avoid this one.

If by "project" you mean "container", then use the HTTP PUT method to create the container: http://(server)/(context)/services/rest/server/containers/(containerName)

With an XML request something like:

<kie-container container-id="(containerName)">
  <release-id>
    <group-id>com.myCompany.productName</group-id>
    <artifact-id>product-name-module-name</artifact-id> 
    <version>1.0</version> 
  </release-id> 
</kie-container>