HomeGuides
Try a DemoGet the Latest ReleaseSee the CHANGELOGCreate a Feature Request / Bug ReportJoin the Conversation
Guides

Messages

Messages are an abstracted data type that store data as it moves through Substation.

Each message contains unexported fields that are accessed by getters and setters:

  • data: Stores structured or unstructured data.

  • metadata: Stores structured metadata that describes the data.

  • flags: Indicates if the message has any unique properties.

Flags

By default all messages are "data messages" that carry data through the system with no special handling, but the system uses flags to indicate when messages have unique data processing requirements.

Control Messages (ctrl)

The system relies on control messages to flush transformed data through a pipeline. Applications provided by the project implement control messages on behalf of the user. For custom applications, see the example in the project repository for implementing control messages.

Control messages are identified by the IsControl flag.

JSON Values

Most users will use the system to evaluate and transform JSON text. The condition and transform functions access JSON values using a common configuration setting named object:

  • object.source_key: Reads a value from an object.
  • object.target_key: Writes a value to an object.

Values stored in the metadata field are accessed using the key pattern meta [key]. Values can be moved between the data and metadata fields using the object.copy transform.