2. Well we can do it 2 ways :-
• By stopping the flow at the end
• By stopping the connector at the end
3. So, in this slide we will be doing the first option :-
By stopping the flow at the end
4. Let us we have following Mule flow:-
Here you can see we are using Groovy component at the end. Now what this Groovy
component will be doing is it will stop the flow at the end using the following code :-
muleContext.registry.lookupFlowConstruct(‘Flow name').stop()
5. The corresponding Mule flow will be as follows:-
You can see here Groovy component is stopping the flow once the file has been read.
Once the file is read no more files will be read from inbound endpoint
6. Now if we start our application we will find that the file connector has picked up the
current file from the inbound folder and have stopped. That means if we place files
again in the inbound folder it will not work anymore :-
We can see here the fileshave been placed successfully in the outbound
folder.
Now no more files will be picked
7. In my next slide I will bring some other techniques in Mule implementation .
Hope you have enjoyed this simpler version.
Keep sharing your knowledge and let our Mule community grow