upload and download file to BDM Database

1
0
-1

Hello, does anybody here know how to upload excel file and download excel file to bdm database? previously i created similar question here https://community.bonitasoft.com/node/33108#node-33131, but the sample given wasn't suit to my project. So let me explain a bit what my project need. In my Project there is a features called upload and download excel file to or from BDM database. Upload and download is a seperate process. In which the sample previously was only consist of one process and the file saved in bonita engine not in a BDM Database. Is there any alternative way to store the file inside the bdm database?
thank you

1 answer

1
0
-1

BDM does not allow to store file as an object attribute. The recommended option to store file is to declare document in the process definition. As you probably figure out document managed by Bonita are stored in the Bonita Engine database (that is also used to call all data regarding processes execution).

If you attend to upload and download only CSV (i.e. text) files and not .XLS/XLSX files a workaround might be to declare a text attribute in the BDM and use it to store the content of the file. If such solution is valid for you I can probably dig a little bit deeper to provide an example. Important: there are probably some limitation regarding performance for large files. It would require some testing.

Comments

Submitted by yogabaskara17_1... on Thu, 11/28/2019 - 11:09

okay if the bdm doesn't allow that, but is it possible to bind the file that is saved in engine with the persistence id in the database table? so when the data is being selected or displayed the file will be displayed as well based on the referenced preference id. Is it possible?

Submitted by antoine.mottier on Thu, 12/19/2019 - 17:39

Yes you can store in an attribute of a business object a process instance id (use Long data type). Using this process instance id you will be able to retrieve the document content using its name.

Notifications