Starting a mule flow programmatically using groovy

守給你的承諾、 提交于 2019-12-18 07:11:40

问题


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.


回答1:


This should do it:

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


来源:https://stackoverflow.com/questions/15394475/starting-a-mule-flow-programmatically-using-groovy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!