Document toolboxDocument toolbox

Gate Delayer

Description

This unit is a Processor unit.

A Gate Delayer is a unit that sets an initial delay, queuing input events for a set amount of time before sending them to the out port. After the delay has been applied once, the unit will continue to fire events to the out port.

The timer is initiated when the flow diagram starts. Inbound events enter through the in port and are held in a queue until the delay has elapsed. When the delay period ends, the events are released to the out port. All inbound events received after the initial delay are sent directly to the out port.

Configuration

After dragging this unit into the Flow canvas, double-click it to access its configuration options. The following table describes the configuration options of this unit:

Tab

Field

Description

Tab

Field

Description

General

Name

Enter a name for the unit. It must start with a letter, and cannot contain spaces. Only letters, numbers, and underscores are allowed.

Description

Enter a description detailing the scope of the unit.

Delay

The initial delay you wish to apply (in milliseconds). This will apply the same initial delay to all input events. To apply delays to individual events, use the Delayer unit.

Input ports

Port

Description

Port

Description

in

All events enter through this port.

Output ports

Port

Description

Port

Description

out

All events are output, unchanged, through this port after the delay time.

Example

In this example, we want to send an HTTP request to the randomuser.me API, which retrieves random user information. We need to send this information via email every second. However, we need to apply an initial delay of 5 seconds, send all the queued requests, and then keep sending the information every 1 second. To do it, we add a Tick unit to fire the request every time we need it. Then, we link it to the input port of the Gate Delayer unit and join its output port to an Http call unit, configured with the API information. Finally, we add an Email sink unit to send it to the required recipients. 

In the Gate Delayer unit properties, you must specify the initial delay time you need. After that time, queued events will be fired, and then, future events will be fired normally. I this case, we need an initial delay of 5 seconds (5000 milliseconds).

Download this example

You can try this flow by downloading this JSON and uploading it to your domain using the Import option:

Â