[英]Pass data (e.g. log message) from processor to Slack or LogMessage processor
Suppose I want have a processor to send a Slack message and I want to reuse it from many other processors.假设我想要一个处理器来发送 Slack 消息,并且我想从许多其他处理器中重用它。 Eg one might need to send "file received" while another might send "failed to unzip file", etc. I'd rather have a single
PutSlack
processor and set the Webhook Text
property to #{logPrefix} -- ${message}
.例如,一个人可能需要发送“文件已收到”,而另一个人可能需要发送“无法解压缩文件”等。我宁愿有一个
PutSlack
处理器并将Webhook Text
属性设置为#{logPrefix} -- ${message}
。 That way all of the other processors can use this single processor to post a message in the Slack channel.这样所有其他处理器都可以使用这个单个处理器在 Slack 通道中发布消息。
Yes, a single PutSlack
is enough, you can configure PutSlack
processor properties to dynamically evaluate their values from the incoming FlowFile attributes since all the properties Supports Expression Language
.是的,一个
PutSlack
就足够了,您可以配置PutSlack
处理器属性以根据传入的 FlowFile 属性动态评估它们的值,因为所有属性都Supports Expression Language
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.