Is it possible to deploy a Bonita Application automatically ? (Organization and BDM specifically)

Hi all,

I’m new to Bonita and i have been tasked to deploy a Bonita application automatically.

For the context, I have developped 3 open source projects to help me deploy the Bonita application with Ansible :

So, the above projects works quite well but i didn’t find in the Bonita documentation how to deploy:

  • an Organization (i upload it and get a 200 status but didn’t see it in the organization tab afterwards)
  • a Business Data Model (no API to upload or create a new one)

Is it possible to deploy the 2 afore mentioned types of resource by the REST API ? If it’s not possible should i conclude that it is not possible to deploy automatically a Bonita application ?

Thanks in advance for your help,
Best regards,
Ludo

I’ll double check but it seems actually that such actions are not available through REST API.

API are available using the Java client library:

Note that before deploying the BDM you need to pause the tenant: https://documentation.bonitasoft.com/javadoc/api/7.5/org/bonitasoft/engine/api/TenantAdministrationAPI.html

If such methods are actually not available using standard REST API you still have the option to build a REST API extension.

PS: I dig inside the source code of bonita-engine to find the missing server api calls, hope it will help me, but if you have any hint on where to find all the possible API calls it is welcome. I have already read the official documentation about the REST API, but the parts about organization and BDMs looks didn’t looks covered in the REST API.

Hi Antoine,

Thanks for your answer. I have tried the Java HTTP client and it works to create an organization, as it is shown in the docs, it means that the APIs i need are available remotely.

I guess that i just have to implement org.bonitasoft.engine.api.HTTPServerAPI.buildEntity in python to send the parameters in a format accepted by Bonita. It is boring, but i will give it a try.

Thanks for your help and best regards,
Ludo

In order to deploy an organization using HTTP calls you can use the upload servlet (/portal/organizationUpload), and then, you need to perform another POST request to services/organization/import in order to deploy it (with, in the body of the request, the JSON organizationDataUpload: “”).

For The BDM, you need to upload it using the servlet portal/fileUpload and then deploy it with the API tenant/bdm which doesn’t seem to be documented, unfortunately. You can have a look at the request performed by the portal when you deploy a BDM to get an example.

Hi Antoine,

Thanks for your answer, you’re right i have been able to upload organization and BDM, although with other APIs, i call directly org.bonitasoft.engine.api.TenantAdministrationAPI to import the BDM zip for instance.

Now i’m stuck on the import of the profiles, but it is more of a technical problem due the serialization API used to communicate with the org.bonitasoft.engine.api.CommandAPI , Java serialization it not easy from Python :frowning: As you prescribed, i use a simple Java test to check what is sent and received from the server for any action i need to implement.

Thanks for your help and kind regards,
Ludo