Hi,
I have a watcher with an aggregation query. In the action section, I am trying to execute two actions (transform, then webhook) for each element in the query response. From the logs, it seems the webhook is being executed before the transform. Is there a way to "force" sequence of actions?
"actions": {
"log": {
"foreach": "ctx.payload.aggregations.downservices.buckets",
"max_iterations": 100,
"transform": {
"script": {
"source": "return ['event':'HttpServiceDown', 'resource':'key[0]','service':'key[1]','severity':2,'status':'Unreachable']",
"lang": "painless"
}
},
"webhook": {
"scheme": "https",
"host": "somehost",
"port": somePort,
"method": "post",
"path": "/some/path",
"body": "{{#toJson}}ctx.payload{{/toJson}}"
}
}
}