@autocodingsystems/node-red-utils v1.2.1
ACS Node Red Utils
Utility nodes for making workflows using the ACS Gateway
Nodes available
Gateway
Gateway nodes allow specific actions to be taken on an ACS Gateway.
gateway-device-resolvefind a named device across multiple gatewaysgateway-device-updatesends a job to a devicegateway-device-clearclear the job from a devicegateway-eventreceive events from a gateway
Flow
A "flow" is a controlled sequence for always running processes.
Messages originate from a begin node and flow towards an end node. Once reached, a new message will be emitted from the begin node, making a never ending sequence of messages. A new message will not be emitted from begin until the previous message has hit an end, meaning there is only ever a single message in the flow.
If a flow message is split between 2 or more paths, the first message to hit an end node invalidates all other messages originating from the original begin message.
A message that has been invalidated will not pass through an inactive node, so you can kill dead messages before they take any action by ensuring the action is guarded by these nodes.
Flow messages can be trapped in a trap node and released at a later date by specially crafted release messages or http requests. A trapped message will be immediately destroyed if a sibling flow message hits an end node. A trap node can only hold one message at a time.
beginsignals the start of message flow.endterminates the current message flow and starts a new one.isactiveonly passes messages that are part of an active message flow.traphold on to a message until it is released or until the flow is ended.routesend flow messages to one output or the other - is toggled by sending control messages to the node.
Miscellany
General nodes for handling common situations
array-splita simplified version of the split node that only supports arrays and has a dedicated "empty" output so that the associatedarray-joinnode can be triggered correctly even if there are no items in the array.array-joinwait for all the messages from the previousarray-splitto arrive, collate their payloads and carry on processing. Also wire the "empty" output from thearray-splitto the input to carry on processing if the array was empty.