Page 1 of 1

Copying files to a sub-process not working if fired from a script-task

Posted: Wed May 15, 2019 11:35 am
by OliverWi
Hello Amos,

I have read the following link regarding file-transfer from main to subprocesses:
viewtopic.php?t=730036

For some reason I need to fire the trigger "send file to subprocess" in your process "New Product" from within a script task. In your initial design it is fired "after routing" from the task which is carried out right before the subprocess, which works fine.
Firing it from a sript task does not work. I have added a timer to make sure the sub-process has been created.
But that does not help either.

Could you please have a look at the process?
I have tried so many variants without success and I hope that you have an idea.

Thank you very much

Kind Regards,

Oliver

Re: Copying files to a sub-process not working if fired from a script-task

Posted: Wed May 15, 2019 11:29 pm
by amosbatto
OliverWi wrote: Wed May 15, 2019 11:35 am For some reason I need to fire the trigger "send file to subprocess" in your process "New Product" from within a script task. In your initial design it is fired "after routing" from the task which is carried out right before the subprocess, which works fine.
Firing it from a sript task does not work.
Oliver, your "copyFile2Sub" script task will not work, because at that point, the subprocess case doesn't yet exist in the database. You need to set the trigger to fire after routing in the task before the subprocess, because at the point the database record for the subprocess case exists in the database, so you can copy the files.

If you don't want to do it that way, then you need to set the trigger to fire in the subprocess to copy the files from the parent case.

Re: Copying files to a sub-process not working if fired from a script-task

Posted: Sat May 18, 2019 4:47 am
by OliverWi
Yes, you are right.
Thank you very much.
Kind Regards,
Oliver