Document Verification Checklist


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?

1 answer


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'


Submitted by samuel.martins_... on Wed, 07/31/2019 - 22:25

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

Submitted by bastien.laurent... on Thu, 08/01/2019 - 08:49

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

Submitted by samuel.martins_... on Tue, 08/06/2019 - 15:01

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

Submitted by bastien.laurent... on Thu, 08/08/2019 - 10:50

Just add a widjet 'container' with a loop on context.myModifiedDocuments_ref.

Submitted by samuel.martins_... on Thu, 08/08/2019 - 20:27

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?

Submitted by bastien.laurent... on Fri, 08/09/2019 - 09:06

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) = ../{{}}
An one other:

myModifiedDocs (Javascript type) with a value like that: 
var modifiedDocuments =[];
return modifiedDocuments;
Submitted by samuel.martins_... on Mon, 08/12/2019 - 13:08

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!

Submitted by bastien.laurent... on Mon, 08/12/2019 - 18:07

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 : ../{{}}.

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