Odd behaviour when uploading forms with the REST API

I observe an odd behaviour when uploading forms using the /form-repository/deployments API.

The API seems to go through successfully when I use the Context root as flowable-rest and REST root as form-api but gives me a bad request response when I use the Context root as flowable-task and REST root as form-api.

The error message I see is
{ "message": "Bad request", "exception": "Multipart request is required" }

In the former case, I don’t see the form in the Forms tab in the flowable-modeler UI app.

Is this normal?

Thanks in advance.


I’ll look into that.
To answer the your last question in the meantime. The forms you see in the modeler app are Form models. (Not deployed forms)
This is ‘design time’. The resource you’re calling is deploying a form (model) to the engine. The same as if you would package a form model in an app and deploy it.
This works the same as for process models (and DMN etc).



Hello @yvo
So you’re saying there is no way to view the forms that were uploaded using the REST APIs on the UI? Also, if they are deployed like process models with the API in question, could I see the form deployment in the flowable-admin UI - in the Form Engine section?


Yes that is correct. You can manage the deployed forms in Flowable Admin.

It’s good to understand there is difference between models in Flowable modeler and deployed counterparts.
Forms / processes / forms and decision tables that exist in the modeler can be deployed to engine(s) by packaging them in an ‘app’. When this app is deployed these models are transformed to deployable artefacts.
For example; a ‘process modeler model’ is then transformed to a BPMN2 XML model.

If you want to transfer models between Flowable modeler instances you can export and import an app using the Flowable Modeler UI.



Thank you for the explanation, @yvo. Couple of more questions:

  1. Is packaging forms/processes/decision tables into an app the only method to deploy a process model? Are there use cases where one can deploy discrete form or decision tables?
  2. I actually don’t see the forms deployed with the REST API in the flowable-admin UI’s Form Engine section. Am I missing something?

Hi Horsey,

first; the issue with not being able to post multipart/form-data requests to the REST API exposed in the Flowable TASK UI is solved by https://github.com/flowable/flowable-engine/pull/548 . Thanks for pointing that out.

  1. No. Packaging to an app is a workflow for distributing ‘modeler objects’ to other modeler instances or deploying them to an engine. Deployable artifacts like f.e. BPMN2 XML artifacts or a DMN XML artifacts can be deployed directly to the engine(s).
    For example design to running a process;
  2. Deployed forms should be shown in the Flowable Admin app. Please check if your Flowable Admin instance is communicating to the same Flowable Engine (via REST) as the one your deploying the forms to.



Thanks for fixing the issue. Is there a way I can build the wars myself or is there a daily build I can pick up from?

I could not see the REST deployed forms in the admin UI. I can re-check that and get back to you.


You can build it yourself by running the distro build locally. (Located in the ‘distro’ folder).



@yvo, I can actually see the form deployment deployed via REST APIs.

Thank you!

I have to admit that I am pretty confused with how to use the REST APIs - mainly about what the Context root and should be for the each of the Flowable modules.
What works:
Using the /flowable-task as the Context root works for all the REST APIs. Where as using /service as the Context root gives me a 404 response.

The REST APIs themselves are separate java modules / components. (flowble-rest, flowable-dmn-rest, etc) They can be exposed in the web application by including and configuring them.
(This way it’s (supposed) to be easy to include and expose them in your own web applications.)

We did that ourselves for example in the Flowable REST web application (flowable-app-rest). On what servlet mapping there made available is done there. Not in the REST API module itself.
If your ‘just’ interested in accessing the Flowable API via REST you can run the this web app.

We also include and expose them in the Flowable TASK UI app. (In addition to some TASK UI specific REST resources). The way they are exposed there is also configured in this web application.

Hope this clarifies some stuff.