String To State
![]()
Description
The String To State processor transforms string properties into a list of state values. It supports:
- Multiple string inputs
- List-based state output
- Field value preservation
- State collection
This processor is essential for:
- Converting strings to states
- Collecting multiple states
- Preserving field values
- Creating state lists
Required input
The processor requires a data stream containing at least one string field to convert into a state.
Configuration
State Field
Select one or more string fields to convert into states. The values of these fields will be collected into a list of states.
Output
The processor creates a new event containing:
- All original fields from the input event
- A new field named "current_state" containing a list of the selected string field values
Example
Input Event
{
"deviceId": "sensor01",
"status": "running",
"mode": "normal"
}
Configuration
- State Fields: status, mode
Output Event
{
"deviceId": "sensor01",
"status": "running",
"mode": "normal",
"current_state": ["running", "normal"]
}
Use Cases
-
State Collection
- Gather multiple states
- Track field values
- Monitor statuses
- Collect modes
-
State Analysis
- Analyze state combinations
- Track value patterns
- Monitor field changes
- Process state lists
Notes
- Multiple fields can be selected
- Output is always a list
- Original fields are preserved
- Processing is stateless
- Empty selections result in empty list
- Field values are preserved as-is