Delay is an activity that can cease the execution for a certain time span. The delay Duration accepts value as TimeSpan data type. You can use this activity in the circumstances requiring a certain waiting time before executing the next activity.
Add and set delay time for Delay in process
Let us understand Delay activity with an example process. Here is an example that writes a number and its square with a delay of 10 sec in the output window.
Come, let's create this process in Process Designer:
Launch and create a new process in Process Designer
- Launch Process Designer from the Windows Start menu located under IntelliBuddies Enterprise
Create New Process
Click on New Process and fill in the new process details
- Add variable to hold number array.
- The array of Int32 holds the numbers 1 to 5.
- Add For Each by setting type as Int32.
- Iterate through the integer array of numbers.
- Display the number and square of this number in output window using Writeline.
- Add Delay before displaying the square of number and set the delay as 10 sec.
Save the process
- From the Design tab ribbon, click on Save
Run the process
- From the Design tab ribbon, click on Run
Make sure the process executes and displays the number and its square with a delay of 10sec.
Download Example (C#)