# Document Verification Checklist

**URL:** <https://community.ofelia.com/t/document-verification-checklist/9759>\
**Category:** Q&A\
**Created:** [30 July 2019 11:53 UTC](https://community.ofelia.com/t/document-verification-checklist/9759 "2019-07-30T11:53:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![samuel.martins\_14065](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@samuel.martins\_14065](https://community.ofelia.com/u/samuel.martins_14065)\
**Post date:** [30 July 2019 11:53 UTC](https://community.ofelia.com/t/document-verification-checklist/9759/1 "2019-07-30T11:53:19Z")

</div>

Hello I am making a flow where the applicant will need to attach some documents needed to start the process, so the documents will go to a manager for analysis, this manager will need to check the documents and return to the applicant the documents that were pending, for example the documents that he did not mark ok returned to the applicant to attach this document again and stay in this loop until all documents were ok, would it be possible to do this in Bonita?

---

<div class="post-metadata">

**Author:** ![bastien.laurent\_1374](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@bastien.laurent\_1374](https://community.ofelia.com/u/bastien.laurent_1374)\
**Post date:** [31 July 2019 07:17 UTC](https://community.ofelia.com/t/document-verification-checklist/9759/2 "2019-07-31T07:17:47Z")

</div>

Yes, it’s possible.  
If you want to save the ‘check status’ in your database, you need to create a business data will save your check value and the bonita document id.  
If it’s not nessesary to save your status in a DB, just create a process variable ‘status’.

And make a loop until your check status is not eguals to ‘ok’

---

<div class="post-metadata">

**Author:** ![samuel.martins\_14065](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@samuel.martins\_14065](https://community.ofelia.com/u/samuel.martins_14065)\
**Post date:** [31 July 2019 20:25 UTC](https://community.ofelia.com/t/document-verification-checklist/9759/3 "2019-07-31T20:25:25Z")

</div>

There are 8 documents that the user will attach, the manager will analyze which document needs to be reevaluated that can be 1 or more or none, if it is 1 or more, he picks this “list” and send to the applicant’s form to retrieve the files. again i tried to validate true and false it worked but i can’t show it in the requestor form

---

<div class="post-metadata">

**Author:** ![bastien.laurent\_1374](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@bastien.laurent\_1374](https://community.ofelia.com/u/bastien.laurent_1374)\
**Post date:** [1 August 2019 06:49 UTC](https://community.ofelia.com/t/document-verification-checklist/9759/4 "2019-08-01T06:49:20Z")

</div>

To show your documents in the requestor form, you need to update all documents that are been modified by the manager and also, create a new list of ‘modified documents’.  
Then, in your form, create a loop container with your list of documents ( context.myModifiedDocuments\_ref ) for downloading or if they are a PDF doc, you can use the widjet ‘pdfviewer’.

---

<div class="post-metadata">

**Author:** ![samuel.martins\_14065](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@samuel.martins\_14065](https://community.ofelia.com/u/samuel.martins_14065)\
**Post date:** [6 August 2019 13:01 UTC](https://community.ofelia.com/t/document-verification-checklist/9759/5 "2019-08-06T13:01:07Z")

</div>

So I would have to create a container and a collection? And get the values ​​from the updated list?

---

<div class="post-metadata">

**Author:** ![bastien.laurent\_1374](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@bastien.laurent\_1374](https://community.ofelia.com/u/bastien.laurent_1374)\
**Post date:** [8 August 2019 08:50 UTC](https://community.ofelia.com/t/document-verification-checklist/9759/6 "2019-08-08T08:50:16Z")

</div>

Just add a widjet ‘container’ with a loop on context.myModifiedDocuments\_ref.

---

<div class="post-metadata">

**Author:** ![samuel.martins\_14065](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@samuel.martins\_14065](https://community.ofelia.com/u/samuel.martins_14065)\
**Post date:** [8 August 2019 18:27 UTC](https://community.ofelia.com/t/document-verification-checklist/9759/7 "2019-08-08T18:27:09Z")

</div>

I’m hitting the part of the script where it will make the other list taking the documents that have the variable isReavaluate true playing for the list myDocumentsEdit, could you help me?

---

<div class="post-metadata">

**Author:** ![bastien.laurent\_1374](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@bastien.laurent\_1374](https://community.ofelia.com/u/bastien.laurent_1374)\
**Post date:** [9 August 2019 07:06 UTC](https://community.ofelia.com/t/document-verification-checklist/9759/8 "2019-08-09T07:06:28Z")

</div>

You have 2 solutions:

- First one:  
Create a new business variable on your process design. Juste before your HumanTask, set the variable like this: MyDocumentDao.findByReavaluate(true). And on tour form, use this new business var.

- Second one:  
On your form, you will need to create multiple variables:  
`myDocuments (ExternalAPI type) = ../{{context.myDocuments_ref.link}}`  
An one other:

---

<div class="post-metadata">

**Author:** ![samuel.martins\_14065](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@samuel.martins\_14065](https://community.ofelia.com/u/samuel.martins_14065)\
**Post date:** [12 August 2019 11:08 UTC](https://community.ofelia.com/t/document-verification-checklist/9759/9 "2019-08-12T11:08:10Z")

</div>

I’m sorry but I couldn’t understand this step, would it be possible to show a little deeper? if possible of course, thank you in advance for your patience!

---

<div class="post-metadata">

**Author:** ![bastien.laurent\_1374](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@bastien.laurent\_1374](https://community.ofelia.com/u/bastien.laurent_1374)\
**Post date:** [12 August 2019 16:07 UTC](https://community.ofelia.com/t/document-verification-checklist/9759/10 "2019-08-12T16:07:37Z")

</div>

We will use the first solution.  
So, in your Bonita Studio, create a new business variable ( Data → Pool variables → Business variables → Add), give a name (myUpdatedDocuments) and a type ( a list of your business data type for your Document).  
Just before your ‘form’ step, add a new script task.  
In this task, go into ‘Execution → Operations’. Assign the value ‘MyDocumentDao.findByReavaluate(true)’ to your variable ‘myUpdatedDocuments’.  
(MyDocumentDao is a Dao that’s generated by Bonita when your create a new Business type).

Now, in your form, you just need to create a variable, ‘myUpdatedDocuments’ of type ‘ExternalAPI’.  
Assign the value : …/{{context.myUpdatedDocuments.link}}.

When you will run your form, you will get a list of ‘updated document’ in your varriable ‘myUpdatedDocuments’
