Document toolboxDocument toolbox

Generator

Description

This unit is a Source unit type.

The Generator unit generates events autonomously based on event frequency, quantity, and content settings configured in the properties.

When the unit receives events, it applies the conditions set in the properties.

Events are output through the out port with the desired period/frequency until the configured number of total events is reached. Optional fields containing the event order number and period start date will be added to the event.

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.

Total events

The total number of events to be emitted. Use -1 to allow an unlimited amount of events.

Counter field name

Enter the name of an input event field containing an event order number, starting at zero, to be added to the output event optional

Table field name

Enter the name of an input event field containing the period start date to be added to the output event optional

Period

Millis

The number of milliseconds between actions. The action depends on the value entered in the 'exact' field of the unit.

Enter 0 to set to 'as soon as possible', rendering the 'exact' field value obsolete.

Exact

If true, the 'millis' value is interpreted as how often to carry out a given process, even if the previous process in the flow has not finished.
If false, the 'millis' value is interpreted as how long to wait after the previous process to repeat the current one.

Aligned

When set to 'on', the period will not start counting from the moment of the alert creation but from a fixed division that takes 0 as the starting point. Only valid for exact periods.

For example, when aligned is on, imagine your 'millis' value is 120000 (2 minutes) and the alert was created at 00:03, the first event will be generated at 00:04 and every two minutes thereafter. However, if it is not aligned, the first event will be generated at 00:03, the next at 00:05 and so on.

Drop past periods

Which action to take when transformation takes longer than the configured period.
If true, past periods are discarded.
If false, past periods are executed without delay.

Input ports

This unit does not have any input ports.

Output ports

Port

Description

Port

Description

out

Outputs the indicated number of events at the given frequency, with optional fields containing the event order number and period start date.

Example

Imagine you wish to generate an unlimited number of events and send them via email.

You can use the Generator unit to emit the desired number of events from across Devo. To do it, we add a Generator unit to fire out events. Finally, we link it to the in input port of an Email sink unit to send it to the required recipients. 

In the Generator unit properties, set the total number of events to -1 in order for unlimited events.

In the Email Sink unit properties, specify the email to send the events to.

Download this example

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

Â