• Docs
  • Home

›Flow Control

Messages

  • Set Property Fixed
  • Delete Message Property
  • Move Property
  • Map Range

Data Formats

  • Convert to/from JSON
  • Convert to/from XML
  • Convert to/from YAML
  • Generate CSV output
  • Parse CSV input
  • Simple GET request
  • Split text

Flow Control

  • Trigger On Start
  • Trigger At Interval
  • Trigger At Time
  • Route On Property
  • Route On Context
  • Operate On Array
  • Trigger Timeout
  • Trigger Placeholder
  • Rate Limit Messages
  • Rate Limit Message Stream
  • Report By Exception
  • Join Streams

Error handling

  • Retry On Error
  • Trigger On Error

HTTP Endpoints

  • Create Endpoint
  • Handle Query Parameters
  • Handle Url Parameters
  • Access Headers
  • Serve JSON
  • Serve Local File
  • Post Data
  • Post Form Data
  • Post JSON
  • Cookies

HTTP Requests

  • GET Request
  • Set URL
  • Set URL using Template
  • Set Query String
  • Parse JSON
  • Binary Response
  • Set Request Header

MQTT

  • MQTT broker
  • Publish Message
  • Set the topic
  • Publish Retained Message
  • Subscribe to a topic
  • Receive a parsed JSON message

OData

  • Define a Metadata Model
  • Define Metadata Model using EDM
  • Convert Request to Query
  • Read Only OData Service
  • Create an OData Service

Sequelize

  • Execute a Query

Auth

  • Basic Authentication
  • Generate JWT
  • Verify JWT

JSONata

  • JSONata Node
  • JSONata Explorer

Breakpoint

  • Introduction
  • How to Use

OpenAPI

  • Introduction
  • OpenAPI Router
  • OpenAPI Client

Release Management

  • Upload Download Release Management

Designer

  • Designer

Monitor

  • Introduction
  • How To Use

CI/CD

  • Introduction
  • Installation

Trigger a flow if a message isn’t received after a defined time

Problem

You want a flow to be triggered if a message is not received after a defined time. For example, you expect to receive a sensor reading every 5 seconds and need to know if it fails to arrive.

Solution

Use the Trigger node to detect when a message has not arrived after a defined interval.

Example

Flow JSON

[{"id":"6ea53ad8.2362a4","type":"debug","z":"ac14500e.2c57d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":450,"y":1160,"wires":[]},{"id":"3da6946e.184a5c","type":"inject","z":"ac14500e.2c57d","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":1160,"wires":[["38caaff4.03f6d","6ea53ad8.2362a4"]]},{"id":"38caaff4.03f6d","type":"trigger","z":"ac14500e.2c57d","op1":"","op2":"timeout","op1type":"nul","op2type":"str","duration":"5","extend":true,"units":"s","reset":"","bytopic":"all","name":"Watchdog","x":270,"y":1200,"wires":[["ae477709.016088"]]},{"id":"ae477709.016088","type":"debug","z":"ac14500e.2c57d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":1200,"wires":[]}]

Discussion

In the example flow, the top branch represents the normal flow of the messages. They also get passed to the Trigger node on a second branch of the flow.

The Trigger node is configured to initially send nothing, then to wait for 5 seconds before sending a "timeout" message. The option to extend the delay if new messages arrive is also selected. This means as long as messages continue to arrive, the node will not do anything. Once 5 seconds passes after the last message to arrive, it will send on the "timeout" message.

← Operate On ArrayTrigger Placeholder →
  • Problem
  • Solution
  • Example
  • Discussion
Copyright © 2021 Cyber Group