02-26-2018 01:06 PM
Hello:
Do you have a script to create a pause of 5 seconds in a workflow?
I appreciate your help.
02-27-2018 06:45 AM
Hi Gilberto,
I am just curious why this must be a script? There may be some reasons NOT to do it this way, but you can use recursive native workflow to delay for five (or more) seconds. This is wont be exactly five seconds, but depending upon how important pausing for exactly five seconds is and you have a bit of wiggle room - as in 5.1-6 seconds wont mess up the processes - this seems to work for me in version 15. not sure when the expression function ceil became available though so your results may vary:
the whole thing looks like this - note that you can keep expanding false branch of the rule forever and will keep getting the repeat. versions ago if you shift + right arrow, the configuration client (where workflow used to be configured) would crash as the branches kept expanding. that does not happens in Studio (*phew*). I only expanded three false branches, but you get the idea
so I am very interested in hearing why i should not do this 😉 I get it may take up more processing power than a script, but how much more and how big of an issue is that?
thanks all - I am looking forward to the comments !
02-26-2018 01:16 PM
Hi Gilberto,
You can have a Workflow Unity script be executed as an Action at the point where you want this pause, and within the Unity script, use C#'s Thread.Sleep method to pause the current thread for 5000 milliseconds. You will probably get slightly more than 5 seconds since there are some work that takes place before the script is executed.
Here's an MSDN page on Thread.Sleep method:
msdn.microsoft.com/.../system.threading.thread.sleep(v=vs.110).aspx
02-27-2018 06:45 AM
Hi Gilberto,
I am just curious why this must be a script? There may be some reasons NOT to do it this way, but you can use recursive native workflow to delay for five (or more) seconds. This is wont be exactly five seconds, but depending upon how important pausing for exactly five seconds is and you have a bit of wiggle room - as in 5.1-6 seconds wont mess up the processes - this seems to work for me in version 15. not sure when the expression function ceil became available though so your results may vary:
the whole thing looks like this - note that you can keep expanding false branch of the rule forever and will keep getting the repeat. versions ago if you shift + right arrow, the configuration client (where workflow used to be configured) would crash as the branches kept expanding. that does not happens in Studio (*phew*). I only expanded three false branches, but you get the idea
so I am very interested in hearing why i should not do this 😉 I get it may take up more processing power than a script, but how much more and how big of an issue is that?
thanks all - I am looking forward to the comments !
02-27-2018 07:05 AM
02-27-2018 09:11 AM
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.