Automating the Deployment

Hi

in Bonita 7.2.2 is it possible to automate the deployment of our rest api extensions and process parameters.

I have used the process api to deploy the .bar files:

BusinessArchive archive = BusinessArchiveFactory.readBusinessArchive(entry.getValue()) ;
final String entryKey = entry.getKey();
ProcessDefinition def = processAPI.deploy(archive);

I now need to configure the process parameters:

final List parameterInstances = processAPI.getParameterInstances(def.getId(),
0,
processAPI.getNumberOfParameterInstances(def.getId()),
ParameterCriterion.NAME_ASC);

Assert.assertNotNull("Failed to deploy "+entryKey,def);

for (ParameterInstance parameterInstance : parameterInstances) {
System.out.println(parameterInstance.getName());
//How do I set these values
}

I cannot find anything in the api that tells me how to update these parameters.

I also need to automate the deployment of our api extension . zip file, how do I do this?

Thanks

for parameters use:

importParameters(long, byte[]) - Method in interface com.bonitasoft.engine.api.ProcessManagementAPI Imports the parameters of the process definition.

for Applications use:

ApplicationAPI

for pages use:

PageAPI

Not sure where the RESTAPI is for importing REST Extensions but it has to be in the javadoc somewhere…

But on further looking try the PageAPI with ContentType set to API_EXTENSION

It’s there in the documentation…

regards
Seán

PS: If this reply answers your question, please mark as resolved.