flowable-engine
flowable-engine copied to clipboard
POST /repository/deployments deploymentKey and deploymentName params are invalid.
In the flowable-rest-6.7.2.jar org.flowable.rest.service.api.repository.DeploymentCollectionResource.
POST /repository/deployments, the method's deploymentKey and deploymentName receive values.
Why use String queryString = request.getQueryString(); to get the deploymentKey and deploymentName.
The queryString is null.
Please show with a failing unit test that this is not working. For now we will close the issue, please reopen it with a failing unit test when possible.
Please show with a failing unit test that this is not working. For now we will close the issue, please reopen it with a failing unit test when possible.
Obviously, request.getQueryString() doesn't need to be used.
curl --location --request POST 'http://localhost:8080/process-api/repository/deployments' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@"/test01.bpmn20.xml"' \
--form 'deploymentKey="key01"' \
--form 'deploymentName="name01"' \
--form 'tenantId="tenatid01"'
Thanks for sharing this information @Jenyow. I see that you are passing the information as multi part form parameters.
We'll look into fixing this
@filiphr if this is not assigned to anyone can I create a PR for this ?
Yes @Abhijeetmishr, you can work on this. I'll assign it to you.
@filiphr @Jenyow I think those values are coming null because of this.
****Its because when you have form enctype="multipart/form-data". You can not get other form fields by using request.getParameter("paramnName");. It will always give you NULL.
You have to use FormItem's isFormField() to check if its regular field or file.****
correct me if I am wrong @filiphr what do you suggest ?
@Abhijeetmishr
@PostMapping consumes is 'multipart/form-data'.
I don't know what the problem is that I upload the file using 'multipart/form-data'.
Delete the line 'request.getQueryString()' and direct use the method params, everything is going well.
@filiphr @Jenyow I think those values are coming null because of this.
Its because when you have form enctype="multipart/form-data". You can not get other form fields by using request.getParameter("paramnName");. It will always give you NULL. You have to use FormItem's isFormField() to check if its regular field or file.
correct me if I am wrong @filiphr what do you suggest ?
@filiphr any suggestion/comment on this ?