问题
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