Open jhorbulyk opened 4 years ago
The process
object is shared between messages
process.state = process.state || {};
async function run(msg, cfg, snapshot) {
this.logger.info(`Pre State is: ${JSON.stringify(process.state)}`);
state = _.merge(process.state, msg.body);
this.logger.info(`Post State is: ${JSON.stringify(process.state)}`);
await this.emit('data', { body : {} });
this.logger.info('Execution finished');
}
Steps to reproduce
Code component:
2.Run the flow once and look at the logs of the code component
Actual Result
The logs contain
Expected Result
The logs contain