-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
Is your feature improvement request related to a problem? Please describe.
Add a function onStartup(), which is triggered when the tedge-flows process starts.
This would be helpful when user wants to do specific initialization only on the startup, like adding specific items to the KV store.
Describe the solution you'd like
Below shows the example how to initialize the mapper KV store for the main device on the startup.
export function onStartup(time, context) {
// Set main device property to KV store
context.mapper.set("key::device/main//", "mainDeviceName");
context.mapper.set("rev::mainDeviceName", "device/main//");
}Describe alternatives you've considered
Additional context
Reactions are currently unavailable