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.
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:
|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.|
|Fields||Fields||Click the plus icon to add fields|
|Name||Enter the name of the expected field.|
|Type||Select the type of the expected output event field (you can also write java class qualified name).|
|As Expression||Whether the 'value' of the field is to be considered as a literal value or as an expression to be evaluated.|
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.
This unit does not have any input ports.
|out||Outputs an event with the configured fields each time you click the unit.|
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.