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

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

in the zip you have : "shared/" and "webapps/".

Put (add) "shared/" into your "tomcat/shared"
Put (add) "webapps/" into your "tomcat/webapps/"

And add <client-debug>true</client-debug> in share-config-custom.xml

Best regards.

robin
Champ in-the-making
Champ in-the-making
Hi Dranakan,

Many thanks for your constant help.
Sorry but when i deployed the files in the way you told i am getting following error  Smiley Sad  :
Context initialization failed
Error creating bean with name 'schemaBootstrap' defined in file [C:\Alfresco\tomcat\shared\classes\alfresco\extension\bootstrap-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.util.List' for property 'preUpdateScriptPatches'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch] to required type [org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch] for property 'preUpdateScriptPatches[16]': no matching editors or conversion strategy found.
Please Help :roll:
Also, once this application successfully deploys where will i be able to see the 'upload file link' ? I workflows i presume.

Thanks a lot !!
Robin

vinodkumarn
Champ in-the-making
Champ in-the-making
Hi Dranakan, the code u have shared in 2shared was very useful, I could able to see the upload screen but when I try to upload a file its getting failed to upload a document.

vinodkumarn
Champ in-the-making
Champ in-the-making
Hi Dranakan, The code u have posted in 2shared was very useful to get the upload screen in workflow but, I am still unable to upload a document even after selecting a document from local machine.Please can u help me out.


Thanks In Advance Smiley Happy

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

I have done some corrections (for 4.0D) and the sample should works better : https://forums.alfresco.com/en/viewtopic.php?f=34&t=42140&p=128862#p128862

Good luck

renzo
Champ in-the-making
Champ in-the-making
Very thanks,
the code and download perfect for WorkFlow Adhoc, but workflow paralell or group, but unable active for workgroup parallel or group… is posible it??

dranakan
Champ on-the-rise
Champ on-the-rise
the code and download perfect for WorkFlow Adhoc, but workflow paralell or group, but unable active for workgroup parallel or group… is posible it??
Yes, it is possible. You have to change some code… take a look at this file : shared\classes\alfresco\extension\workflow\qs-workflowModel.xml

Good luck

chrisokelly
Champ on-the-rise
Champ on-the-rise
Hi,

I was unable to get this to run in Alfresco-4.0.e. No errors appear in the debug window, just:
15:30:36 DEBUG - Validating field 'file0' is a valid node name
15:30:36 DEBUG - Validating regular expression of field 'file0' using args: {pattern => {}, match => false}
but the file upload window reports Failure.

I am not sure if I am missing something, should it be prompting me for a location to put the uploaded file in the repository? I would check the permissions but I am not sure which folder to check

EDIT: immediately after posting I thought again - it seems as though this extension uses the flash uploader. We have had to disable this due to a bug with SSL, firefox and the flash uploader, but it seems that it is used even though it is disabled in share-config-custom. Is there a way to modify this to use the html uploader instead?
FURTHER EDIT: we've re-enabled the flash uploader and it works fine for uploading to the doclib when we access our site by http (rather than https), however we still get the same problem using it in the workflow form Smiley Sad
FINAL EDIT: Discovered the issue. I had accidentally created the site testWorkflow to start with, rather than workflowTest. I noticed straight away and used the "edit site details" dialog to fix it, but did not notice that while this changes the site name it does not change the folder name in the Sites directory (that is - the path was still "testworkflow/documentLibrary/") deleting this site then creating it with the proper name fixed the issue.

For the record, it is possible to modify this code slightly in order to have the location the file is dropped be dynamic between tasks/workflows and configurable in a task variable. I can't think of a portable way to provide this (or I would) and it's a longer process than I want to hijack your topic for, but anyone who needs this feel free to PM me and I can walk you through it.

jim_earley
Champ in-the-making
Champ in-the-making
I know you tried this with 4.0.d.  I just tried it with 4.2.0 and got the following exception (below)  when I upload a file (upload fails).  Any ideas? 

TIA,

Jim

Nov 05, 2012 11:34:24 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [Spring Surf Dispatcher Servlet] in context with path [/share] threw exception [Could not resolve view with name '_d41d8cd98f0b24e980998ecf8427e' in servlet with name 'Spring Surf Dispatcher Servlet'] with root cause
javax.servlet.ServletException: Could not resolve view with name '_d41d8cd98f0b24e980998ecf8427e' in servlet with name 'Spring Surf Dispatcher Servlet'
   at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1029)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:374)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:722)

jim_earley
Champ in-the-making
Champ in-the-making
Cancel that last question - fat fingered the site name

A couple of other observations:  is there a way to attach the uploaded files to the current workflow?  In the workflow, the siteId is hard coded, how would you pass in bpm_context value?

Thanks for your help.

Jim
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.