cancel
Showing results for 
Search instead for 
Did you mean: 

/repository/deployments 'message':'Bad request','exception':'File must be of type .bpmn20.xml

grosserbetafan
Champ in-the-making
Champ in-the-making
When I use rest api 5.14.4 I get the follwoing error message when I try to install a new deployment

"message":"Bad request","exception":"File must be of type .bpmn20.xml

When I use 5.14.1 all works fine.

// String deploymentUrl = baseURL + "/repository/deployments"; 5.14.4
         String deploymentUrl = baseURL + "/deployment"; // 5.14.1
         System.out.println("deploymentUrl" + deploymentUrl);
         HttpPost hp = new HttpPost(deploymentUrl);

         MultipartEntity se = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
         File file = new File(localBPMN);
         se.addPart("success",
               new StringBody("success", Charset.forName("UTF-8")));
         se.addPart("failure",
               new StringBody("failure", Charset.forName("UTF-8")));
         FileBody fileBody = new FileBody(file);
         se.addPart("file", fileBody);
         se.addPart("name", new StringBody("TESTContextDealing.bpmn"));
         hp.setEntity(se);
2 REPLIES 2

grosserbetafan
Champ in-the-making
Champ in-the-making

Wring mistake:
5.16.1 Create a new deployment ith REST API  works
5.16.4 Create a new deployment ith REST API  does not work

jbarrez
Star Contributor
Star Contributor
The API implementation was changed from Restlet to Spring MVC, so most likely the change is due to that.
This is how we upload a bpmn 2.0 xml in our unit test: https://github.com/Activiti/Activiti/blob/master/modules/activiti-rest/src/test/java/org/activiti/re...
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.