Included in the UiPath.Persistence.Activities there is an action for ‘Resume After Delay’
The problem is, it doesn’t work in an unattended bot ran via orchestrator nor if I trigger it via the assistant in attended mode which seems contrary to the documentation.
The only way I can get it to even come close to working is run the process directly in studio, however I’d need to keep pressing start on the suspended workflow in order to continue, that also will not automatically keep processing…
Just to demonstrate I am using it correctly, just make a blank workflow, add the persistence activities and set the project to allow persistence and to run in the background.
Then on the main add from the code snippets ‘Suspend and Resume After 5 Minutes’, publish this and try to run it from assistant and / or through orchestrator on an available machine. It will suspend and never wake up. The trigger for the job in orchestrator shows Status ‘Ready’ and Type ‘Timer’ immediately even if the 5 minutes aren’t up and the job never resumes.
Be happy to be corrected if I am missing something, otherwise I think this activity is useless and a bug and needs to be fixed.
if there are different it might be the case if f.e there is US MM/dd/yyyy and dd/MM/yyyy in the rest of the world and that is looks like that robot doesn’t want to start over again.
@MateuszSzatkowski I understand where that guess comes from but that is not how the persistence activities work. Its not ‘asleep’ on my machine. The state of the job is serialized and the state in Orchestrator set to suspended, at that point there is no longer code running on the machine and when the job resumes it can continue execution on another machine. Therefore local settings cannot affect a bot ‘waking up’. Furthermore the input parameter for the activity is a DateTime so regional settings won’t be an issue. I did humor you and change the regional settings but it has no effect.
The issue is in orchestrator. It is not setting the job status back to Pending when the timer trigger is up.
For context, when a job is suspended, if you look at the details you can see the triggers it is waiting for to wake up, these can be Queue Items, Jobs, Action center tasks etc. These all work great, the timer does not.
I’d be really happy if someone else can confirm they are indeed broken as I am pretty sure I am using them correctly.