web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

What should I replace a "Timeout Until" step with when converting background workflows to real-time workflows?

(0) ShareShare
ReportReport
Posted on by

I have a bunch of background workflows that need to be converted to real-time workflows so that the "Modified By" field doesn't get updated with the workflow owner.  The problem is that a lot of the workflows that need to be converted have a "Timeout Until" step where the workflow waits one minute to run.  These "Timeout Until" steps are necessary, as there are plug-ins and other workflows that need to run first in order for these workflows to run correctly.

I do not believe it is possible to use "Timeout Until" in a real-time workflow.  My question is what should I replace "Timeout Until" with?  I want certain workflows to execute AFTER other workflows, so I need some sort of replacement.

Below is an example of a background workflow I need to convert to a real-time workflow:

1563.Workflow1.PNG

Any help/workaround suggestions would be greatly appreciated.  Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    There is no such replacement available out of box. If you just need to implement a timeout for say 1 minute of few seconds, you can create a custom workflow activity which uses Thread.Sleep for that amount of time.

    With this workflow activity, you can replace your Timeouts statement but you may not be able to replace all other process statements like wait until (in this example).

    Hope this helps.

  • Community Member Profile Picture
    on at

    Hi Ravi,

    Thank you for your reply.  Are you aware of any workflows like this that exist in GitHub or somewhere else online?  I am not very technical and don't think I'd be able to create this custom workflow on my own.

    If not, are there any other possible workarounds that don't involve custom workflows activities?

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    I don't think it is available open source but it is very simple if you know some basics of custom workflow? You just need to add a parameter which accepts time in miliseconds and then use Thread.Sleep for that parameter.

    Something like this

    ======================

    using System.Activities;

    using Microsoft.Xrm.Sdk.Workflow;

    namespace Workflow.Test

    {

       public class TimeOut : CodeActivity

       {

           [RequiredArgument]

           [Input("Timeout (in milliseconds)")]

           public InArgument<int> inTimeout { get; set; }

           protected override void Execute(CodeActivityContext executionContext)

           {

               var timeout = inTimeout.Get(executionContext);

               System.Threading.Thread.Sleep(timeout);

           }

       }

    }

    ======================

    You can refer this sample www.ashishvishwakarma.com/.../

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans