# REST: correct way to get start form model

**URL:** <https://forum.flowable.org/t/rest-correct-way-to-get-start-form-model/3110>\
**Category:** Flowable Engine\
**Created:** [December 21, 2018, 2:15pm UTC](https://forum.flowable.org/t/rest-correct-way-to-get-start-form-model/3110 "2018-12-21T14:15:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![thesis](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@thesis](https://forum.flowable.org/u/thesis)\
**Post date:** [December 21, 2018, 2:15pm UTC](https://forum.flowable.org/t/rest-correct-way-to-get-start-form-model/3110/1 "2018-12-21T14:15:35Z")

</div>

Hi all.

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** :

1. GET /flowable-rest/service/form/form-data?processDefinitionId=PROCDEF\_ID gives us a formKey;
2. GET /flowable-rest/form-api/form-repository/form-definitions?key=FORM\_KEY&latest=true gives us a form definition’s id;
3. 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?

---

<div class="post-metadata">

**Author:** ![xcaptain](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/xcaptain/32/1286_2.png) [@xcaptain](https://forum.flowable.org/u/xcaptain)\
**Post date:** [December 25, 2018, 6:48am UTC](https://forum.flowable.org/t/rest-correct-way-to-get-start-form-model/3110/2 "2018-12-25T06:48:16Z")

</div>

See [https://forum.flowable.org/t/bare-minimum-rest-api-chain-calls-to-do-an-app-made-from-flowable-web-application/2010/3?u=xcaptain](https://forum.flowable.org/t/bare-minimum-rest-api-chain-calls-to-do-an-app-made-from-flowable-web-application/2010/3?u=xcaptain)

---

<div class="post-metadata">

**Author:** ![Robinyo](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@Robinyo](https://forum.flowable.org/u/Robinyo)\
**Post date:** [December 26, 2018, 1:15am UTC](https://forum.flowable.org/t/rest-correct-way-to-get-start-form-model/3110/3 "2018-12-26T01:15:10Z")

</div>

Also, see: [https://robferguson.org/blog/2018/12/24/flowable-rest-api-part-1/](https://robferguson.org/blog/2018/12/24/flowable-rest-api-part-1/)

---

<div class="post-metadata">

**Author:** ![thesis](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@thesis](https://forum.flowable.org/u/thesis)\
**Post date:** [December 28, 2018, 11:06am UTC](https://forum.flowable.org/t/rest-correct-way-to-get-start-form-model/3110/4 "2018-12-28T11:06:25Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![xcaptain](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/xcaptain/32/1286_2.png) [@xcaptain](https://forum.flowable.org/u/xcaptain)\
**Post date:** [December 28, 2018, 11:25am UTC](https://forum.flowable.org/t/rest-correct-way-to-get-start-form-model/3110/5 "2018-12-28T11:25:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![xcaptain](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/xcaptain/32/1286_2.png) [@xcaptain](https://forum.flowable.org/u/xcaptain)\
**Post date:** [December 28, 2018, 11:30am UTC](https://forum.flowable.org/t/rest-correct-way-to-get-start-form-model/3110/6 "2018-12-28T11:30:19Z")

</div>

The rest api can’t fullfill all my needs, I’m learning the java examples, [https://github.com/flowable/flowable-examples/tree/master/flowfest-2018/demo-own-application](https://github.com/flowable/flowable-examples/tree/master/flowfest-2018/demo-own-application)

---

<div class="post-metadata">

**Author:** ![Robinyo](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@Robinyo](https://forum.flowable.org/u/Robinyo)\
**Post date:** [December 28, 2018, 9:29pm UTC](https://forum.flowable.org/t/rest-correct-way-to-get-start-form-model/3110/7 "2018-12-28T21:29:26Z")

</div>

> [@thesis](#):
>
> 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.

You are correct, to quote the [Users Guide](https://www.flowable.org/docs/userguide/index.html#apiEngine):

“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](https://github.com/flowable/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 🙂

---

<div class="post-metadata">

**Author:** ![tijs](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@tijs](https://forum.flowable.org/u/tijs)\
**Post date:** [December 29, 2018, 10:17am UTC](https://forum.flowable.org/t/rest-correct-way-to-get-start-form-model/3110/8 "2018-12-29T10:17:24Z")

</div>

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.

Best regards,

Tijs
