由于某种原因,当我想在代码中使用它们时,我添加到readonly变量(也尝试过readwritevariables)的变量未在代码中生成。我想念什么?我已经在控制流中添加了此脚本任务。将其添加到数据流中时,它可以正常工作。这是问题吗?
致谢!
答案 0 :(得分:2)
在脚本任务中,您必须使用以下语法:
"actions": {
"email_users": {
"email": {
"profile": "standard",
"to": [
"jcarpenter@mydomain.com"
],
"subject": "File Identifier",
"body": {
"html": "<p>Files could not be identified due bad receiver id. There were {{ctx.payload.hits.total}} files that could not be identified.</p> <ul><li>{{#ctx.payload.aggregations.file_name.buckets}}{{key}}{{/ctx.payload.aggregations.file_name.buckets}}</li></ul>"
}
}
}
参考