What is the correct REST routine to get a “start form” model for particular process definition?
Currently I can only see triple-call method to achieve it with flowable-rest:
- GET /flowable-rest/service/form/form-data?processDefinitionId=PROCDEF_ID gives us a formKey;
- GET /flowable-rest/form-api/form-repository/form-definitions?key=FORM_KEY&latest=true gives us a form definition’s id;
- at last, GET /flowable-rest/form-api/form-repository/form-definitions/FORMDEF_ID/model gives us a model.
On the other hand, flowable-task app uses single undocumented call: GET /flowable-task/app/rest/process-definitions/PROCDEF_ID/start-form
So, which method is correct, if any? Also, will flowable-task’s call be standartized in future releases?
@xcaptain, @Robinyo thank you and sorry for late answer.
The distinctive part of my question is that it concern the start form, that is – correct me if I wrong – has to be fetched before the process is instantiated.
Anyway, I’m using that “3 requests” method now because the second approach – apart from being undocumented – seems to be unable to work with basic auth.
We are facing the same problem, submit a form and get a form are undocumented in flowable(several rest api can do these).
It would be great if the flowable team can standardize the rest api, also I found that the rest api is so much different with the
flowable-ui-task http api.
You are correct, to quote the Users Guide:
“A start form is a form that is shown to the user before the process instance is started, …”
I haven’t been able to find a ‘consuming Flowable’s REST API example’ (there isn’t one in the Flowable Examples repository)
So I am working my way through the Users Guide, the OpenAPI docs, the REST API end points and the HTTP verbs
The Flowable Task application internal REST API has indeed some improvements to make it easy to fetch the form of a specific process definition or task and submit this form. The logic uses the Java service API available in the BPMN / CMMN and Form engine.
What needs to be done is to expose this REST API in the BPMN / CMMN Engine REST API directly, so you don’t need to do several REST calls. I’ll try to get some first version implemented in the next couple of days.