I created a business process that starts when an attachment is added to a section (start singnal configured on "record added" to the section attachments).
The business process starts before the end of the file upload then it's not able to read all file content in a script task.
Is there a way to start my business process after the upload has completed?
Like
Hi,
You can add a script component in you process and use a Sleep Method (1000 is one second)
System.Threading.Thread.Sleep(1000);
Jerome BERGES,
I tried uploading a file of 50MB and it takes 40 seconds to be uploaded: 1 second wouldn't be enough.
The time to wait depends on the speed of the connection and on the file size.
In my test I saw that the file size property increases while the upload proceed, then I used a workaround in my business process: before reading the file a make a loop with a wait of 2 seconds if the current file size is bigger than the one read in the preceding loop. The BP proceed to the file read procedure if the file size doesn't change in 2 seconds. It seems to work but it's really a workaround: is there something more currect and secure to wait for the file to be fully uploaded?
Thanks