Document toolboxDocument toolbox

.Tick vv7.0.8

Description

This unit is a Source unit type.

The Tick unit is a unit that fires an event on demand. This is designed to be used mainly for testing purposes. To fire the event, click on the red circle of the unit icon.

The unit receives all events. When you click the icon, the expression set in the properties is executed on these events. Output events are then sent through 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:

TabFieldDescription
GeneralNameEnter a name for the unit. It must start with a letter, and cannot contain spaces. Only letters, numbers, and underscores are allowed.
LanguageSpecify the language you will use to write the expression in the Value field, e.g. Javascript, Groovy, etc.
FieldsFieldsClick the plus icon to add fields 
NameEnter the name of the expected field.
TypeSelect the type of the expected output event field (you can also write java class qualified name).
As ExpressionWhether the 'value' of the field is to be considered as a literal value or as an expression to be evaluated. 
Value

Value of the field.

If 'asExpression' is off, the value is interpreted as a literal value in string form, which will be parsed into the corresponding type.

If 'asExpression' is on, the value is interpreted as an expression, which will be evaluated to produce a value of the corresponding type. In particular, if you specify a string field as an expression, you should surround it with quotes.

Input ports

This unit does not have any input ports.

Output ports

PortDescription
outOutputs an event with the configured fields each time you click the unit.

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 by email with a delay of 5 seconds from the moment we ask for the user info. 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 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. 

You don't need to add any configuration to the Tick unit.

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