How to stop a mule flow from running after startup

痴心易碎 提交于 2019-11-29 12:59:47

Instead of trying to stop the flow during the initialization phase, configure it to be stopped when Mule starts:

<flow name="..." initialState="stopped">

then have your custom logic start it when the time is good, for example by using MEL:

<expression-component>app.registry.targetFlow.start();</expression-component>

Alternately there is a properties file called mule-deploy.properties
You can find there, all the flow xml files name are written there manually:-

config.resources=yourFlowName.xml

You can remove the flow name which you don't want to start at the time of Mule application getting started.
But yes, David's solution is recommended, and you should use this solution only as alternative.

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