# Easy way to save multiple documents to Alfresco

**URL:** <https://community.ofelia.com/t/easy-way-to-save-multiple-documents-to-alfresco/6954>\
**Category:** Q&A\
**Created:** [11 February 2016 12:00 UTC](https://community.ofelia.com/t/easy-way-to-save-multiple-documents-to-alfresco/6954 "2016-02-11T12:00:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tresnjica93\_1](https://avatars.discourse-cdn.com/v4/letter/t/e68b1a/32.png) [@tresnjica93\_1](https://community.ofelia.com/u/tresnjica93_1)\
**Post date:** [11 February 2016 12:00 UTC](https://community.ofelia.com/t/easy-way-to-save-multiple-documents-to-alfresco/6954/1 "2016-02-11T12:00:18Z")

</div>

Is there an easy way to save multiple documents from Bonita to Alfresco dynamically?  
I have found some instructions in the following link, but it didn’t work for me.  
[http://community.ofelia.com/questions-and-answers/multiple-documents-upload-single-form](http://community.ofelia.com/questions-and-answers/multiple-documents-upload-single-form)

I basically have a form with multiple documents input, but not all documents are mandatory. I need a solution to save 1, 5 or 10 documents without having to make more than one Alfresco connector and without being obliged to put all the documents. I am new to Bonita and I would appretiate any help I can get.  
Can anyone help me out with this? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Sean\_McP](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/sean_mcp/32/932_2.png) [@Sean\_McP](https://community.ofelia.com/u/Sean_McP)\
**Post date:** [11 February 2016 12:51 UTC](https://community.ofelia.com/t/easy-way-to-save-multiple-documents-to-alfresco/6954/2 "2016-02-11T12:51:44Z")

</div>

I have a list of documents and then use a MultiInstantiation step to call a service task to upload the documents.

Easy as pie…

regards  
Seán

_PS: If this reply answers your question, please mark a resolved._

_PPS: I see you used my previous instructions…that was for 6, you need to modify for 7…_

---

<div class="post-metadata">

**Author:** ![vivek.paranthaman](https://avatars.discourse-cdn.com/v4/letter/v/cdc98d/32.png) [@vivek.paranthaman](https://community.ofelia.com/u/vivek.paranthaman)\
**Post date:** [11 February 2016 12:23 UTC](https://community.ofelia.com/t/easy-way-to-save-multiple-documents-to-alfresco/6954/3 "2016-02-11T12:23:37Z")

</div>

Hi,

May I know, how you are trying to upload the document(one or more), is it using the document variable?..

Regards,  
Vivek

---

<div class="post-metadata">

**Author:** ![tresnjica93\_1](https://avatars.discourse-cdn.com/v4/letter/t/e68b1a/32.png) [@tresnjica93\_1](https://community.ofelia.com/u/tresnjica93_1)\
**Post date:** [11 February 2016 12:40 UTC](https://community.ofelia.com/t/easy-way-to-save-multiple-documents-to-alfresco/6954/4 "2016-02-11T12:40:39Z")

</div>

Yes, I am using the document variable as single and without any initial content. Output operation is document reference of type java.lang.String.

---

<div class="post-metadata">

**Author:** ![tresnjica93\_1](https://avatars.discourse-cdn.com/v4/letter/t/e68b1a/32.png) [@tresnjica93\_1](https://community.ofelia.com/u/tresnjica93_1)\
**Post date:** [11 February 2016 13:12 UTC](https://community.ofelia.com/t/easy-way-to-save-multiple-documents-to-alfresco/6954/5 "2016-02-11T13:12:52Z")

</div>

Hi Sean,

I am using Bonita 7, but for creating forms I am using Bonita 6.x App. Does that make any difference for your old instructions? Seems to me that they should work in that case. I made an AddAFile button and I added the JavaScript code in the HTML widget initial value, but nothing happens when AddAFile button is clicked. It doesn’t start the script for some reason.

Best regards,  
Jovana

---

<div class="post-metadata">

**Author:** ![vivek.paranthaman](https://avatars.discourse-cdn.com/v4/letter/v/cdc98d/32.png) [@vivek.paranthaman](https://community.ofelia.com/u/vivek.paranthaman)\
**Post date:** [11 February 2016 15:10 UTC](https://community.ofelia.com/t/easy-way-to-save-multiple-documents-to-alfresco/6954/6 "2016-02-11T15:10:13Z")

</div>

Hi,  
Yes there are changes in 7
