1
votes

Can anyone please suggest how can we start and stop a Mule flow from the mule server using commands?

Thanks!

5

5 Answers

1
votes

Go to the bin folder in the mule server.

Start: ./mule start
Stop: ./mule stop
Status: ./mule status

1
votes

Removing the anchor file undeploys the application.

For Reference : https://docs.mulesoft.com/mule-user-guide/v/3.7/application-deployment

0
votes

You cannot do that, you can only stop a flow via mmc.

0
votes

You cannot stop individual flow of mule application.If you would like to stop the complete mule application from running .

  1. If you are using mmc --> you can find stop button over there to stop running.
  2. If you are using command prmt deployment remove the specific anchor.txt file for the mule application under apps folder and rerun the mule.bat file to restart the server.

  3. If you are deploying via cloudhub, you can find undeploy button in settings page of the application of Runtime manager you can just click on that.

Thanks, Lakshmi.

0
votes

You can hold or freeze the message for a certain time in a flow though with Groovy scripting and build logic around it achieve something similar to start/stop. Hope it helps.

<scripting:component doc:name="Groovy">
    <scripting:script engine="Groovy"><![CDATA[
     sleep(10000);
     return message.payload;]]>
    </scripting:script>
     </scripting:component>

Reference: http://stackoverflow.com/questions/31115684/how-to-set-sleep-into-the-flow-in-mulesoft-without-losing-the-message-payload