cancel
Showing results for 
Search instead for 
Did you mean: 

Upload file during a wofklow

dranakan
Champ on-the-rise
Champ on-the-rise
Hello,

I need to upload file during a workflow. Actually we can add a file which is already in Alfresco.
Has someone done this ?

Thank you.

(Alf 4.0b)
30 REPLIES 30

jpotts
World-Class Innovator
World-Class Innovator
Hi dranakan!

It sounds like you have a running workflow and you have some content in the repository, let's say someFile.pdf, and you want to add someFile.pdf to the running workflow.

If so, that's definitely possible. Files are associated to a workflow by virtue of being inside a workflow package, which you can think of as a temporary folder that exists for the life of the workflow. You can use the workflow service to get a handle to the workflow package, then add the someFile.pdf node to it.

Jeff

ruchin78
Champ in-the-making
Champ in-the-making
Hi jpotts,
I appreciate, if you can explore the way to do it.
I am very new to Javascript as well as Alfresco.
It would be appreciable, if you can share some links/code with me.

Regards
Ruchin Sharma

dranakan
Champ on-the-rise
Champ on-the-rise
Thank you Jeff 🙂

My goal is to add a file from the disk (Upload file) and not to select one file already in Alfresco.
I would like to add the "upload" button (from http://server:8081/share/page/repository) in the workflow forms.

Actually I am looking in the file : WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/documentlibrary/include/toolbar.lib.ftl
I define a field to use ftl (in share-config-custom.xml) using "control template". The ftl should have the code starting the selector file. https://forums.alfresco.com/en/viewtopic.php?f=48&t=41486#p122981

umang_gupta
Champ in-the-making
Champ in-the-making
Hi dranakan,
Even i am looking for the same functionality. Request you to elucidate if you found a solution.

Regards,
UG

dranakan
Champ on-the-rise
Champ on-the-rise
Hi Umang_gupta,

Update on the 25.05.2012 :
You can find here a sample in 4.0D to do this : http://www.sendspace.com/file/3arndk or http://www.2shared.com/file/-iY4mBWY/2012_05_25_POC_Add_Files_In_Wo.html

How to install

cp -R webapps /opt/alfresco-4.0.dtest1/tomcat/
cp -R shared /opt/alfresco-4.0.dtest1/tomcat/

Change client-debug to true : tomcat/webapps/share/WEB-INF/classes/alfresco/share-config.xml
         <client-debug>true</client-debug>

In Alfresco, create site with name "workflowTest". The file will go here…

Go to Start Workflow, Adhoc Activiti Process and you should see a new button "Upload File(s)"

Thank you to lukasz_turakiewicz.

Best regards.

Hi dranakan,

Please provide source because on above link the source is not available.

rsinelle
Champ in-the-making
Champ in-the-making
Hi dranakan,

I have started to test your sample. When a try to upload a document, every time the upload displayed error in the form and the end of the process.

Do you have a tips or anything else to find the solution, because I have no log in share, alfresco, javascrip debugger …) ?
thanks for your help.

Richard

dranakan
Champ on-the-rise
Champ on-the-rise
Hi Richard,

Check that the user has enough right to write the file (check destination)… Check the destination exists…

Good luck

robin
Champ in-the-making
Champ in-the-making
Hi dranakan,
i am trying to run you sample but finding problems. Do i need to replace the files in the attachment in respective folders or do in need to save them in /extensions??
Please Help.

Regards,
Robin
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.