# Accessing form data from Java Code

**URL:** <https://forum.flowable.org/t/accessing-form-data-from-java-code/4331>\
**Category:** Flowable Engine\
**Created:** [August 9, 2019, 6:40am UTC](https://forum.flowable.org/t/accessing-form-data-from-java-code/4331 "2019-08-09T06:40:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akki](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@akki](https://forum.flowable.org/u/akki)\
**Post date:** [August 9, 2019, 6:40am UTC](https://forum.flowable.org/t/accessing-form-data-from-java-code/4331/1 "2019-08-09T06:40:53Z")

</div>

Hi, I wanted to know about the way to get handle to data entered by user in form in the flowable-task api.  
I have gone through [this question](https://forum.flowable.org/t/form-engine-looking-up-form-data/711) which redirects to [this github link](https://github.com/flowable/flowable-engine/blob/f75b644e329ab5156043e0527668ff80cea1532e/modules/flowable-form-engine/src/test/java/org/flowable/form/engine/test/FormInstanceTest.java) for solution.  
But looks like it is old code and few things have changed.

Apart from that I looked into form related classes like FormModel, FormDefinition, FormRepositoryService, FormService. But not sure how exactly I use them  
-\> **FormModel:** just implements serializable  
-\> **FormDefinition:** can get the informdation about form from here, but not about it’s data  
-\> **FormRepositoryService:** can see methods returning formmodel, formdefinition, but i don’t think those can help in retrieval of user data from form.  
-\> **FormService**

---

<div class="post-metadata">

**Author:** ![akki](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@akki](https://forum.flowable.org/u/akki)\
**Post date:** [August 12, 2019, 10:31am UTC](https://forum.flowable.org/t/accessing-form-data-from-java-code/4331/2 "2019-08-12T10:31:42Z")

</div>

Okay I am digging here and there to get the form data entered by user and have come acorss this FormInstance class, which has methods, `getFormValuesId()` , `getFormValuesBytes()`.

They have below descriptions:  
-\>**getFormValuesId()** - Reference to the JSON document id that contains the submitted form values  
-\>**getFormValuesBytes()** - The JSON document that contains the submitted form values

I also looked in the database(POSTGRESQL) and found table `act_fo_form_instance` having a column of `form_values_id`, which is actually I think referencing to another table `act_fo_form_resource`.

In `act_fo_form_resource`, there is column with bytea datatype, I have checked that also, but the data is not there, which I entered in form.

If, anyone has any clue or idea on how to get the entered form data, let me know. Thanks in advance

**Note** : Form is added in a user task and after entering data in form, I am clicking on save, not on complete
