Justin.Bell
Justin.Bell

Reputation: 105

Start Mule Flows Stopped/toggling flows

So I have an application with multiple flows, for multiple clients. What I'm looking to do is have a way to toggle this flows on and off at the needs of each client.

I setup a flow to monitor a folder for a file that I basically call muleContext.registry.lookupFlowConstruct(flow).start/stop depending on each line of the file. This part works great, and does what I'd expect.

Now the tricky part I'm struggling to figure out, is every time I deploy the application, all flows run once before my flow reads the properties file and disables the flows that need to be disabled. Is there a way to have flows default off, so we can easily toggle them without having to redeploy the whole app with them excluded?

Upvotes: 0

Views: 110

Answers (1)

chetan singhal
chetan singhal

Reputation: 948

You can set flow initial state to stopped:

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

Upvotes: 1

Related Questions