1

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

Thanks!

user6042886
  • 21
  • 1
  • 7

5 Answers5

1

Go to the bin folder in the mule server.

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

Chad
  • 152
  • 3
  • 1
    Thanks for your response! These commands are for starting/ stopping Mule server. I need the commands for starting/ stopping Mule flow in a mule application. – user6042886 Jul 12 '16 at 17:31
1

Removing the anchor file undeploys the application.

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

SKR
  • 11
  • 1
0

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

Alex Fernandez
  • 1,892
  • 14
  • 17
  • Thanks Alex for taking a look! Could you please let me know if Mule documentation says anywhere that we cannot start/ stop a mule flow from command line? – user6042886 Jul 12 '16 at 17:31
  • Hi, It is not explicitly written in the documentation that you cannot do it. However, what you can do with the command line is written [here](https://docs.mulesoft.com/mule-user-guide/v/3.8/starting-and-stopping-mule-esb). Hope it helps. /T – Tony K Jul 13 '16 at 09:59
  • In addition, you have the Mule Agent API available [here](https://docs.mulesoft.com/mule-agent/v/1.4.0/) but it seems that there is no resource for starting/stopping flows. /T – Tony K Jul 13 '16 at 10:01
  • Thank you!! I will look through the documentation, appreciate the help. – user6042886 Jul 13 '16 at 14:09
0

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

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

user3366906
  • 149
  • 2
  • 11