Direction
Properties by default are reactive and bi-directional, meaning they are both read and write. However, indicating how the Property is used can be very useful for the user to understand the intent of the properties. The direction
Property field can be used to do this.
Direction Values
both
: This Property can be both read (get) or written (set). For example, bothcontext.get('value')
andcontext.set('value', newValue)
are used in the node. This is the default.output
: This Property is written (set) by the node and not read. For example, onlycontext.get('query')
and notcontext.set("query", newValue)
is used in the node.input
: This Property is only read (get) by the node. For example, onlycontext.get('result')
and notcontext.set('result', newValue)
is used in the node.
Example
properties.yaml
query:
datatype: text
direction: input
result:
datatype: json
direction: output
value:
datatype: json
direction: both