How to export a process?

Hello,

for all artifact, we can IMPORT and EXPORT the artifact via the JAVA API.

For example, for a RestApi Extension, I can import it via

PageAPI.createPage(PageCreator pageCreator, byte[] content)

and export it via

byte[] PageAPI.getPageContent(long pageId)

 

For Organization, the same via

OrganizationAPI.ImportOrganization() and OrganizationAPI.Exportorganization()

So, all Artifact can be import / export, except that I don't see the method for a Business Process ?

 businessArchive = BusinessArchiveFactory.readBusinessArchive(fileInput);

then

processAPI.deploy( businessArchive )

But do I get the BAR file from an existing process?

I see that method

protected void writeBusinessArchiveToFile(BusinessArchive businessArchive, File businessArchiveFile, List<BusinessArchiveContribution> contributions) 

 

Note: there should be more useful to have not a File but a OutputStream.

So, it should be possible to get the BusinessArchive, but how?

Thanks you

 

Hi,

The Java method you are mentioning is not available by default in REST.

You can still create a REST API extension to call the Java method if you need it.

 

HTH,

Captain Bonita

 

Hello,

I found this method in Java

ByteArrayInputStream processInputStream = new ByteArrayInputStream(processAPI.exportBarProcessContentUnderHome(processInfo.getProcessId()));
 

but what about a REST CALL?