@wmfs/tymly
Version:
A framework for building and sharing workflows in Node.js
13 lines (11 loc) • 383 B
JavaScript
module.exports = class SetConfiguredRegistryKey {
init (resourceConfig, env) {
this.registry = env.bootedServices.registry
this.key = resourceConfig.key
}
run (event, context) {
this.registry.set(this.key, event)
.then(() => context.sendTaskSuccess())
.catch(err => context.sendTaskFailure({ error: 'SetConfiguredRegistryKeyFail', cause: err }))
}
}