common

inject

This component allows you to inject a message into a flow. You may inject it in the middle of the flow or initiate a new flow with this component.

You can specify time or time spans for repeating messages.

Useful for repeated tasks: backups initiation, dashboard info updating, etc. Or for starting time setting up: for example, you want lights to turn off at 9 am. Also useful to imitate some input to test a flow.

Properties

Most components have common properties. Explore Set Up Properties.

For the inject component, there are some specific ones:

  • msg.payload (1) - the main part of a message object that the component sends. Exists nearly in any component (as well as msg.topic) by default. Usually bears the main information in the message object.

  • msg.topic (2) - the part of the message object.

  • add (3) - this button allows you to add more parameters to the message object. Click add, give it a name and value. For example, 'msg.password' with 'QWERTY' value.

  • A message object property msg.payload value (4) - by default, this is timestamp - the number of seconds from a particular moment in 1970 till now. Click an arrow and choose a needed data type, then set a value to the parameter.

  • A message object property msg.topic value (5) - by default is empty, but it`s useful sometimes to name your message object, especially when you have more than one.

  • Inject once after checkbox (6) - allows you to postpone the first message sending.

  • Repeat option (6) - allows you to choose intervals of message sending, including the None option.

debug

This component will help you to understand what exactly happens at any step of the flow.

Say you are composing an app that allows an operator to update some information in a database by clicking a button on a tablet after some event happens: "Hit the button when a basket is full." You compose an app, but you`d better check whether the message that goes to a file is correct before releasing the application.

Add a debug component to a certain place at the flow, deploy, and examine the debug window`s result. In this example, we use a user interface previewer (UI Viewer - right click on the {}....json file) to press a button that sends the message to the function component. Using the debug component, we see the result message of the function component.

Properties

You may choose (1) whether to show the complete message object (with all properties) or just the main property - payload (default).

In this example, first we use msg.payload to be shown, second - complete message object. In the complete message object, we see all the message properties (_msgrid id, payload, and topic). Clicking the arrow to expand the message object.

Another debug property shows the result in the status under the component (2).

complete

The component monitors other components` tasks completion and passes their output to a triggered component. Useful for components without output sockets - such as http response or even debug component if you want.

Properties

The component`s properties are different ways to choose the flow components to monitor.

You can Select nodes (components) (1) right in the flow tab, seek by name (2), or choose from the list (3).

Give names to components in the flow - you will find them easily in complete component properties.

The complete component sends each monitored component`s output without changes in turn.

catch

The component catches exceptions in your flow.

Properties

There are two modes for this component (1):

  • all nodes, when the catch component monitors all the components in the flow for errors, and you can choose to Ignore errors handled by other Catch nodes (components);

  • and selected nodes when it monitors selected ones. In this second mode, the selection options are the same as in a complete component.

When the component catches an error it stores the relevant information to a message object in the form of attached attributes:

  • error.message - the error message;

  • error.source.id - the id of the component that threw the error;

  • error.source.type - the type of the component that threw the error;

  • error.source.name - the name, if set, of the node that threw the error.

If you choose the complete msg object output option in the wired debug component, you will see these attributes in the debug tab. If we choose the msg.payload output option, we will see an error message.

status

The component reports status messages from other components.

Properties

There are two sources for this component reports: all nodes and selected nodes. In this second mode, the selection options are the same as in a complete component.

When the component status info it stores the report to a message object in the form of attached attributes:

  • status.text - the status text;

  • status.source.type - the type of the node that reported status;

  • status.source.id - the id of the node that reported status;

  • status.source.name - the name, if set, of the node that reported status.

If you choose the complete msg object output option in the wired debug component, you will see these attributes in the debug tab.

In the following example, we used a switch component to monitor its` status.

link in and link out

These components allow you to divide your flow into two or more flow tabs. Just connect a link out component with a link in on another flow tab, and it will be considered one flow.

comment

This component carries an inscription and does not connect to other components.

Use it to add some information for developers to a flow appearance.