UiPath Persistance Activity Not working properly

I tried using creating a simple workflow to test the UiPath Persistency activities Resume After Delay based on the code snipped provided by UiPath

In the project settings I have enabled persistence
image

The Project
image

Running in Orchestrator

It does not resume automatically

The workflow stops when it is supposed to stop, but it does not resume automatically after the 90 seconds. Is there something I am missing?

When I click publish I see this message, what is it?
image

Thanks in advance

@loginerror

@William_Blech_Sister - this is a message that warns users that they cannot have any UI based activity on a process meant to run in the background.

Also if I recall right if you are running it from Studio, you have to hit Resume in Studio when the Workflow is paused ( not sure, but could be worth looking into and eliminating it as the cause)

thanks

I also posted the same thing recently.

Resume After Delay is not working at all it seems, I don’t know if they previously had it working and broke something in the Orchestrator, but for now I cannot get it to work.

Hi William,

When using the delay activity with persistence based workflows, specifically when suspending workflows within orchestrator, there are some known activities that can cause issues.

In particular, “Delay” and “Retry Scope” activities are not supported and do not work properly when used in the Main workflow of an Orchestration Process. In such cases, they should be placed inside a “No Persist Scope” activity. See more details on best practices and conditions when using orchestration / persistence activities here: https://docs.uipath.com/studio/docs/orchestration-process#best-practices

Hope this helps answer your query.

Ryan.

2 Likes

Hi @William_Blech_Sister,

By any chance, do you have delay activity in your main workflow?

“Do not use the Delay activity in the workflow file set as Main in projects that support persistence. Either move Delay activities to other workflow files in the project or use the Resume After Delay activity in the file set as Main.”

Also, if you are executing your project (with enabled persistence) directly from studio, you would have to resume it specifically by clicking resume. Automatic resume for persistent projects only happens when run via orchestrator.

So, to test this functionality, you might want to try running in unattended mode via orchestrator and see if it works?

Regards
Sonali

Hello @RyanHarris ,

I am not using “Delay” and “Retry Scope” activities as shown in my print.

Can you provide me a working version of a project with the “Resume After Delay” Activity, based on my simple workflow

Thanks

Hello @sonaliaggarwal47

I am not using any delay activity nor running the process is running via Studio, it is running via Orchestration

Do you have an example with this activity you can share?
Thanks

“Resume After Delay” inside a “No Persist Scope” pauses the workflow indefinitely and it is not possible to continue it, I think this is a bug.

Resume after delay was fixed a last year. I had it reported as a bug to UiPath and they fixed it in the next release they had, the job was not correctly getting a trigger to wake it back up. It now works.

‘Delay’ will not, its a core functionality of how some asynchronous activities work and will suspend the workflow but not set a trigger to wake up again, adding it to a no persist scope gets around this by preventing suspension. Delay is for pausing the running process on the current session so cannot persist, Resume After Delay is to suspend the job, wait, then resume it (perhaps on a different machine).