Flowable-form: how to return the form properties to user

hi,
I start a flow, then i can get the formKey of this user task, but the form properties is null.

B%25_W9)2LQDL%40XD%60(WMM33%25Q

probably you need to query form engine for form by formKey, not the task itself.

thanks, i resolved it by SQL.:joy:

Hi,

Form Properties are the old way of attaching fields to task. If you use the flowable forms to attach fields to user task, then you will get formProperties Null because these properties no longer attached to user task but a seperate form is attached (by form key) and then you have to query the form to get all the fields. You can do something like this to get form and its properties attached to task.

Map<String, FormField> formFields = taskService.getTaskFormModel(“taskId”)
.allFieldsAsMap();

Now, You can iterate over this map keys to get FormField Class Object for each Field key and get its properties from here.

Hope this helps.

Thank You,
Arpit Agrawal

image 希望可以帮到你。

Could you suggest which query you used - not sure where these form properties are stored ? thx

See https://flowable.com/open-source/docs/bpmn/ch08-Forms/#form-properties

If you can elaborate on your use case, we probably can point to more specific docs.