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. -
ctrl
: Indicates if the message is a data message or control message.
Control Messages
By default all messages are data messages, but the system relies on control messages to flush transformed data. 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.
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.
Updated 12 months ago