So i have Trying to set up my Sequence where when a file is is created It extracts the data from the newest files added. I tried the for each activity and it kind of works but, when i add the wait for validation activity it doesn’t allow it because i guess that isn’t compatible with it. Is there a way around this. Also im using Generative Extractor
If you’re using action center and waiting for an action to be completed, you can’t do it inside a loop. You need a top down automation that processes one file, creates the action, and waits. The Job will suspend at the wait activity (which means your loop won’t continue until after the first action is completed).
I suggest creating a dispatcher automation that populates a queue with the files to process. Then a queue trigger to start the top down process to handle that file from the queue item.
Not quite true Paul. You can absolutely have the wait action in a loop and there are occassions to use that. For example lets say in your process you want to validate 5 documents and only continue when they are all done.
In that scenario its totally fine to but the wait activity in a loop. The job might wake up a few times to iterate over the loops but thats no big deal, and once they are all done the rest of the process can continue.
I suspect the issue here has that, for some weird reason, in the 23.4 release (I think) UiPath added a constraint preventing persistence activities in a normal loop.
Luckily they reversed it a few versions later and we can use loops again as there are absolutely use cases for it, both for Human in the Loop and Robot in the Loop.
Yeah, the wording of the message suggests they get an error, which I think would be explained by the issue I raised. Its entirely possible they are trying to use it in the Reframework, in which case your advice is sound, but they’d get an error irrespective of the loop.
You can loop the action objects using parallel for each loop and make sure that while creating action center task you are not using any non-serializable object in the same scope.