#Documents

Documents and memory

Hello,

How the Bonita Engine, in 7.10.x, manage the memory when it operates with documents?

1/ Widget File Upload => Upload

During this operation, is the complete document is loaded in memory to create a temporary file, or only per packets (10000 char for example)?

2/ Submit the contract

Currently, during the file upload, an ID (temporary file name) is returned. That's means during the Submit contract, there is no memory engage, correct?

3/ in the operation, upload the document

How to get the name of a file uploaded in a document

Hello,

my process uploads a file (xlsx, csv or txt) via the instantiation form in a document, using the UPLOAD widget.
Let's say, for example, that I select the file "Conso_data_2020_03.xlsx".

The document declared at the pool level is called "myConsoDataFile".

In a process task, I want to copy this file to a different directory than the original one.
To do this, I download the document by applying the following script, found on this forum:

Comment récupérer le nom d'un fichier uploadé dans un document

Bonjour,

mon processus charge dans un document, un fichier de données (de type xlsx, csv ou txt) via le formulaire d'instanciation et le widget UPLOAD.
Par exemple, le fichier sélectionné peut s'appeler "conso_data_2020_03.xlsx"

Le document, déclaré au niveau du pool s'appelle lui "fichierDonnees".

Dans une tâche du processus, je souhaite recopier ce fichier dans un autre répertoire que le répertoire d'origine.
Pour ce faire, je download le document en appliquant le script suivant, trouvé sur le forum :

How to change the description of a file?

Hi,

In my groovy file, I wrote a loop function like below:

Document doc=apiAccessor.getProcessAPI().getDocument(it.id);

doc.description=it.comment;
if(doc.description.equals(it.comment)){
request.vendorName+=" description changed";
}

Invalid initial content for document

Hi, I'm using Bonita Studio Community version 7.8.4.
In a project, I create an instantiation form and it works correctly until I added a document in Data tab and set initial content for it from contract. Just I set initial content for my document variable, below error is showing in validation status or when I run the project:
Invalid initial content for document reqDocument. No FILE contract input has been found.
When I'm going to edit document, file Contract input is cleared! I adding it again but still the problem exist!

How to Handle Documents using Fragments

Hi
I have a Custom Fragment where I have Multiple Text Boxes and Drop Downs. Also each row will contain a file Upload Widget. Now Using Buttons , I can add more Items to collection or Remove Items from Collection.
I am able to save the Text Data from Fragment into database but I am confused , how to handle documents this way.
I am aware of handling Documents using Containers and File Upload Widget but that is used only for Documents. In my scenario , I have other input fields and drop downs.

recieve pdf document from an ASP.net API and attach it to a process (version 7.6)

Hi

I'm trying to call an ASP.Net API using REST connector that return a pdf file and attach it to a process, the API is tested and works fine off bonita using Postman.

at the connector output operation I added this code :

Get java.io.File from attached document

Hi,

How can I convert an attached document to a standard Java File type in a Groovy Script Connector?

Thanks in advance.

Can't get document by url or id

Hey guys,
I read this: https://documentation.bonitasoft.com/6.x-7.2/documents-0 and tried to implement this but faild.
I tried two ways, that I will show you and maybe some of you can help me and say what the next steps could be.

First try:
I got the url of my pdf, its: documentDownload?fileName=BookOne.pdf&contentStorageId=1643
https://ibb.co/fPvwXJ

[resolved] How to empty process' attachments (documents)

Hi all,

In my process, documents are attached using variables of Document type and the Upload Widget for uploading documents to forms.
At the end of the process, there is no need to keep the exchanged documents.
How could I remove them from the database?

Notifications