Overview
This node, named "Heliont Contract Recalibrator," is designed to modify a global contract object stored in the workflow's static memory. It allows users to add or update fields within this contract or delete specified fields using dot notation to target nested properties. This is particularly useful in scenarios where a shared contract object needs dynamic updates during workflow execution, such as adjusting configuration parameters, user data, or other structured information that multiple nodes depend on.
A practical example would be maintaining a user profile contract where certain attributes need to be updated or removed based on incoming data or business logic without recreating the entire contract from scratch.
Properties
| Name | Meaning |
|---|---|
| Fields to Add/Modify | A collection of fields to add or update in the contract. Each field requires: |
| - Field Name (dot.notation): The path to the property in the contract to set or create. | |
| - Value: The value to assign to the specified field. | |
| Fields to Delete | A collection of fields to remove from the contract. Each requires: |
| - Field Name (dot.notation): The path to the property in the contract to delete. | |
| Test Contract (JSON) | JSON input used only in manual/editor mode to simulate a contract when none exists in memory. |
Output
The node produces two outputs:
Main Output:
An array of items where each item'sjsoncontains a stripped version of the original input data (with contract-related metadata removed). This output represents the transformed input data after recalibration.Contract Output:
A single item containing the updated global contract object under thejson.contractfield. This reflects all additions, modifications, and deletions applied during execution.
The node does not output binary data.
Dependencies
- The node relies on a utility function (
stripContract) imported from a local module to clean input data before output. - It depends on a global contract object stored in the workflow's static data under the key
"contract". This contract must exist prior to running the node unless operating in manual mode with a test contract provided. - No external API keys or services are required.
Troubleshooting
Error: "No contract found in memory. Please create a contract before modifying it."
This occurs if the global contract object is missing and the node is not running in manual mode. To fix, ensure a contract is created and stored in the workflow's static data before this node executes.Error: "Invalid JSON in Test Contract field"
When running manually, if the "Test Contract (JSON)" property contains malformed JSON, parsing will fail. Validate and correct the JSON syntax.Fields not updating or deleting as expected
Ensure that the field names use correct dot notation matching the structure of the contract object. Nonexistent intermediate objects will be created when adding/modifying fields but must exist for deletion operations.