How to Handle Documents using Fragments

1
0
-1

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.
The Contract is defied as Complex type having multiple child attributes.
I have defied a Document at Process level but I cannot use Operation to map Document on left side and Contract on right side as Files types are not matching.
Do we need to write any custom groovy script for this purpose ? if yes, Please suggest some sample code.
Assuming we achieve this using Groovy, While Displaying the Fragment in the Next form , how do I attach the document to the fragment such that each row item will contain a Link element and upon clicking the link , we can download the documents corresponding to each row as uploaded by user.
I hope I made myself clear. Kindly let me know what would be the best way to implement a scenario like this .Please feel free to suggest any clarification if required.

Comments

Submitted by delphine.coille on Tue, 11/17/2020 - 09:03

Hi Dibyajit,

I see that you're using a custom fragment. As I know you are really active with Bonita, have you already tried Bonita 7.12 Beta? This version is now enriched with many Studio and UI Designer components, including fragments.

This blog post gives you more details and the link to download it: https://community.bonitasoft.com/blog/bonita-712-beta-out

Submitted by Dibyajit.Roy on Wed, 11/25/2020 - 17:07

Hello Delphine

We are planning to migrate our Production from 7.3.3 to 7.11
Maybe next year, I will see if we can move to 7.12 and start using that.

Thanks

Submitted by delphine.coille on Thu, 11/26/2020 - 10:09

Hi Dibyajit,

I see, just in case your migration plan is just under definition, FYI 7.12 should be released by the end of next week.

1 answer

1
+1
-1

Hello,

I suggest using the contract generation wizard to have a look of the mapping is done with documents. Create a process with a multiple document by example, then add contract from this document (Add from data... in Contract property section of the process), then create an UID form this contract, a working example is generated. You can do the same thing on task in EDIT mode and then generate a form again. It does not use the fragment, but it is a good starting point to understand how you can manipulate the documents in your form.

HTH
Romain

Notifications