×
Built-In: Flow Variable Nodes
Nevelex Labs Logo

Overview

The Flow variable nodes provide the ability to save state within an Incident to determine future behavior within a flow.

Functionality

The Flow Variables nodes expose the following functionality:

  • Set or create Flow Variables via the NL Incident Set Flow Variables node.
  • Add existing Flow Variables into a message via the NL Incident Get Flow Variables node.
  • Route a message based on the value of a Flow Variables via the NL Incident Flow Variable Router node.

Flow Nodes

This node provides the ability to load all or a subset of flow variables associated with the active Incident and insert them into the current message. The retrieved flow variables can be used to modify flow logic or as data input for other nodes in the flows.
Property
Description

Name

The display name of the node within the flows.


Select Flow Variables

If Select Flow Variables is not checked, all exiting flow variables are added to the current message. If Select Flow Variables is checked, the list of flow variable Name values contains the case sensitive list of flow variables names to load and save into the current message.


Output Field

The Output Field is the storage location for variables to be saved into the current message. The Output Field is relative to msg.payload. The flow variables are saved as name-value pairs within the Output Field. Any flow variable Name which does not currently exist for the incident is not saved into the Output Field. Missing flow variables are not considered an error case.

This node provides the ability to route a message through the flow by testing the Incident's named flow variable against the test value. Unless a filtering error is encountered, this node does not log its behavior on success.
Property
Description

Name

The display name of the node within the flows.


Flow Variable

The Incident’s Flow Variable is tested based on the selected Test Operation.


Test Operation

The following list describes the Test Operation logic. For brevity in the equations shown, fv is the Flow Variable, tv is the Test Value, minv is the Minimum, and maxv is the Maximum.

  • Equals: The Flow Variable is checked for equality against the Test Value. This is useful for checking boolean, numeric, string, or JSON values. For a JSON Flow Variable, a deep object comparison will be done. Equation: fv == tv
  • Not Equals: The Flow Variable is checked for inequality against the Test Value. This is useful for checking boolean, numeric, string, or JSON values. For a JSON Flow Variable, a deep object comparison will be done. Equation: fv != tv
  • Less Than: The Flow Variable is checked to ensure that it is less than the Maximum. This is useful for checking numeric or string values. Equation: fv < maxv
  • Less Than or Equal: The Flow Variable is checked to ensure that it is less than or equal to the Maximum. This is useful for checking numeric or string values. Equation: fv <= maxv
  • Greater Than:-The Flow Variable is checked to ensure that it is greater than the Minimum. This is useful for checking numeric or string values. Equation: fv > minv
  • Greater Than or Equal:-The Flow Variable is checked to ensure that it is greater than or equal to the Minimum. This is useful for checking numeric or string values. Equation: fv >= minv
  • Range (inclusive):-The Flow Variable is checked to ensure that it is greater than or equal to the Minimum and less than or equal to the Maximum. This is useful for checking that a numeric or string value is within an inclusive range of values. Equation: minv <= fv <= maxv

Test Value

The Test Value the Test Operation is checking against.

  • string: Static text entered by user.
  • number: Number entered by user.
  • boolean: true or false
  • msg.: Allows for the selection of an attribute within the message traversing the flow.
  • flow.: This selects part of the flow context’s saved data as the source. This information is shared with only the nodes on a given tab.
  • global.: This selects part of the global context’s saved data as the source. This information is shared by all nodes regardless of tab.
  • J: expression: JSONata expression language to perform query and transform operations on the payload.
This node provides the ability to add or update a set of flow variables associated with the active Incident. Flow variables can be used to keep track of actions taken on an Incident to determine future behavior within a flow.
Property
Description

Name

The display name of the node within the flows.


Updates

The variable Name is case sensitive and is the name of the variable to be used by other flow variable nodes throughout the flows.

The variable Type must be consistent throughout the flows to ensure value updates can be made in other NL-Incident-Set-Flow-Variables nodes.

The variable Value is the desired value of the variable.

Learn More

JSON Message Format

The following sample shows the JSON content, which conforms to Node Messaging Format.

Success

The italicized, green text is retrieved by the NL Incident Get Flow Variables node. The NL Incident Set Flow Variables node was configured to add JSON, string, and number variables to the flow.

"payload": {
    "flowVariables": {
      "#": 85,
      "json": {
        "domain": "baddomain.com"
      },
      "String": "Hello"
    }
  }
}

The NL Incident Flow Variable Router node was configured to route the message through the True output based on the Equals string value.

Nevelex Labs, Main Office

Metro Office Park
2950 Metro Drive, Suite 104
Bloomington, MN 55425
Phone: +1 952-500-8921

©Nevelex Labs, LLC. 2018-2024, All Rights Reserved.

EULA