Storage (Get/Set Value) Node use in Custom Nodes

Hi,

I’m implementing a custom node, which uses storage, to implement the rate-limit of some experience endpoints, but I realized that the nodes: Storage (Get / Set Value), have a different behavior when they are inside a custom node, they generate a key with the following customNode pattern - {{nodeId}} / {{key}}, which differs for each instance of the custom node, and it is not possible to know the nodeId, only the custom node Id. the key without the customNode prefix - {{nodeId}}, when the key is created in the workflow that is inserted. Because it is only possible to do this using the Losant Api node, however it does not provide the INCREMENT function, which somehow forms a queue. At the moment I had to put the storage node out of the custom node to work as desired.

image


image

Hey @Vander_Maziero,

This is intended behavior. One instance of a Custom Node uses its own Storage and does not share the same Storage across multiple different instances of that Custom Node. This is done so that instances of a Custom Node do not conflict with one another.

Please let me know if you need any more clarification on this.

Thank you,
Heath

Right,

but if the instances of the custom node are in the same workflow, the keys are saved in the flow storage and not the custom node. A suggestion would be to be able to pass the flow id that will be saved, as this is only possible via API, and in my use case it is necessary to use the INCREMENT of storage, in which different instances of the custom node could increment the same key , as in the image. Because via API has competition problem to update the storage.


flow.flow (13.3 KB)
increment.node (9.2 KB)