如何在CloudHub中取消部署Mule应用程序时触发流程?
我正在研究一个用例来触发特定的流程,该流程仅当从 CloudHub 取消部署应用程序时才会触发。
我找到了一篇包含脚本的文章,并且正在使用相同的文章来找出流程开始:
https://docs.mulesoft.com/scripting-module/2.0/scripting-module-examples
您能帮我找出从 CloudHub 发起取消部署后触发流程的方法吗?
I am working on a use case to trigger a specific flow that should trigger only when undeployment of the application happens from CloudHub.
I found an article that has script and am using the same to find out the flow start:
https://docs.mulesoft.com/scripting-module/2.0/scripting-module-examples
Can you help me to find out the way to trigger a flow after undeployment is initiated from CloudHub?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有办法做到这一点。脚本执行发生在流程执行内,这可能是由调度程序在启动时触发的。无法在 Mule 应用程序关闭时触发流程。请注意,它应该在关闭时进行,因为取消部署是 Mule 运行时不知道的 CloudHub 事件。取消部署时,CloudHub 命令 Mule 关闭应用程序。
There is no way to do that. The script execution happens inside a flow execution, that is probably triggered by a scheduler at startup. There is no way to trigger a flow at shutdown of the Mule application. Note that it should be at shutdown, because undeployment is a CloudHub event that the Mule Runtime is not aware of. At undeployment CloudHub commands Mule to shutdown the application.