使用groovy以编程方式启动mule流程 [英] Starting a mule flow programmatically using groovy

查看:100
本文介绍了使用groovy以编程方式启动mule流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我被告知可以在启动过程中使用 initialState =停止属性。 (如何阻止启动后运行的骡子流

我需要知道如何使用groovy脚本启动流程。



使用骡3.2.2。

解决方案



 <脚本:成分> 
< scripting:script engine =groovy>
muleContext.registry.lookupFlowConstruct('targetFlow')。start()
< / scripting:script>
< / scripting:component>


I need to control the execution of a flow manually through a HTTP call.

I have been told I can disable the flow from executing during startup using the initialState="stopped" attribute on the flow. (How to stop a mule flow from running after startup)

I need to know how to start the flow back using a groovy script.

Using mule 3.2.2.

解决方案

This should do it:

<scripting:component>
    <scripting:script engine="groovy">
        muleContext.registry.lookupFlowConstruct('targetFlow').start()
    </scripting:script>
</scripting:component>

这篇关于使用groovy以编程方式启动mule流程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆