Persisted State Changes
The Persisted State Changes mapping (persistedstate) detects whether specific fields have changed by inspecting the message history.
It checks the following sections of the message:
history/updatedhistory/insertedhistory/deleted
If any of the configured fields appear in these history sections, the message is considered updated and continues through the workflow.
If none of the monitored fields appear in the history, the message is automatically discarded.
This mapping requires that the incoming message already contains history information. Add history information by checking the Include history checkbox in the mapper.
Attributes for Persisted State Change Mapping
| Attribute | Required | Description |
|---|---|---|
| From | Yes | Defines the source field for the mapping. |
| To | Yes | Defines where the result should be inserted. |
| Precedence | Yes | Determines the order in which this mapping is applied relative to others. |
| Function Type | Yes | Must be "Enrichment/lookup functons" |
| Function | Yes | Should be set to "Persisted State Changes" |
| Fields | Yes | A list of fields separated by ; that should be checked for changes in the message history. |
How It Works
- The mapping reads the configured Fields list.
- Each field is checked in the message history under:
history/updated/<field>history/inserted/<field>history/deleted/<field>
- If any field is found in the history, the message continues through the workflow.
- If none of the fields appear in the history, the message is automatically discarded.
Example
Fields configuration
status;priority;assigned_to
Behavior:
- If
history/updated/statusexists → message continues - If
history/inserted/priorityexists → message continues - If
history/deleted/assigned_toexists → message continues
If none of these fields exist in the history sections, the message is discarded.
Typical Use Cases
- Detecting updates when the source system provides field change history
- Filtering polling results to process only modified records
- Avoiding unnecessary processing of unchanged data
- Optimizing integration performance by discarding irrelevant messages
Options for state change
| Mapping | How it detects changes |
|---|---|
| In-memory State Change | Uses an internal cache |
| Persisted State Change | Uses message history |