Ideally I’d have liked a volatile system key, value store - maybe using something like Datahub.write(path,data, 0) but I couldn’t see a way to implement this within an edge action event handler .
I guess that a virtual resource is the method I should use and reorder the implementation so that event handler returns sets the data.
Looking a bit further into this I think it’s likely that virtual resources created from an edge action are volatile. No sure if creating /virtual/config (non-volatile) entries from a edge action is possible.
Anyway - I came across some odd behaviour when I was attempting to use the system counter function as a state machine by setting it’s value on exit from the event handler
Also stuck on a problem trying to change /util/counter/value as well. Not meaning to hijack the thread, but I think it may be similar in nature.
I have an edge action monitoring an observation on /util/counter/value. The EA processes my business rules and then like in John’s example above, once it reaches a condition, I have dh://util/counter/value": [0] in the return statement which is meant to “reset” the value.
No matter what we do in the EA, the counter value retains its current number and won’t take the new value. To further troubleshoot, we also sent a basic command stream event, such as:
Interestingly, the command stream event temporarily sets the counter value to 0, but within the next util/counter/period iteration, the value again resumes its prior number.
Not sure what is going on, could be something simple we are overlooking. However, this is a key part of our data flow algorithm which isn’t working as intended.