External Forms - REST API

I am trying to understand and get a basic workflow to work with external forms - in this case, forms that are composed externally in JSON format and uploaded with the Forms REST API.

Let me explain with the steps I follow in case I use the Flowable UI:

  • Create a process model with a single user task.
  • The user task is assigned to a User using the Assignment tag.
  • A form is associated with the user task using the Form reference tag (form is created in this case with the Form editor).
  • The workflow model is published as app
  • The model is instantiated using the flowable-tasks UI.

How can I achieve the above steps if I upload the form using the Flowable Form API? I understand the first step of uploading (deploying), the form using POST form-repository/deployments API.

Once the form is uploaded, I don’t seem to see it in the Form editor in the modeler UI. Does this imply I have to build the process model manually?

Also, what’s the best place to instantiate the form (uploaded with the Form API) in the sequence of the REST call flows?
Can I use the Flowable-task UI application as a reference for the APIs called?

Not sure I understand the use case fully: do you want to create the form json somewhere else (but keep the same json fomat) and then upload them and link them to a user task in a process definition?

Note that doing the deployment to the system is actually making them runnable at runtime. When you want to see them in the form UI, you’d have to store the form json as a form model. When inspecting the network traffic in your browser, you can see that this does a POST to the /app/rest/models endpoint when creating a model.

Hello @joram

We basically want to upload custom JSON forms - forms that have data that is relevant our client applications - into the Flowable form engine.
We expected that the Form engine REST APIs would allow the upload and customisation of Forms beyond the fields that exist or supported by Flowable Forms at the moment but that does not seem to be the case.

A few posts have suggested that one can use the Form Key to load custom forms from an external host to meet the custom forms requirement. Is this the only way it can be done?

Thanks for your response.

Yes, that is indeed correct. For the engine, irregardless of using the built-in or custom forms, the data is stored as process variables. As long as you make sure to persist the data like that, there is no difference for the engine.