cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti process deployment though REST service failing

kanchan_ghosh
Champ in-the-making
Champ in-the-making
Hi,

I tried to deploy a process (zip file containing the process only, a very simple process with one human task only) through REST service, But it is failing with this error
{
message: "Bad request"
exception: "Multipart request with file content is required"
}

The URL I hit is - http://localhost:8080/activiti-rest/service/repository/deployments
POST method with
HEADER
————
Authorization = Basic a2VybWl0Omtlcm1pdA==       <= digest of kermit / kermit login.
Content-Type =  multipart/form-data; boundary=—–gc0p4Jq0M2Yt08jU534c0p—-
Accept = application/json
Attached the zip file as binary in REST Client - POSTMAN

What am I doing wrong here ?

Thanks,
Kanchan
1 REPLY 1

erikwinlof
Confirmed Champ
Confirmed Champ
Hi,

It's hard to say without seeing the entire body of the request. The correct Activiti logic is called (org.activiti.rest.service.api.repository.DeploymentColelctionResource) and it throws the exception due to this code:

    MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;

    if (multipartRequest.getFileMap().size() == 0) {
      throw new ActivitiIllegalArgumentException("Multipart request with file content is required");
    }


Perhaps the request body isn't formatted correctly or could the content length header perhaps not be sent?

Cheers,

:: Erik