Search code examples
multithreadinggroovymuleesbanypoint-studio

How to stop asynchronous flow in mule


I am trying to stop asynchronous flow in mule by using muleContext.registry.lookupFlowConstruct('').stop() command in groovy script, but even after it still triggering the flow.I want stop it abruptly.


Solution

  • you can try

    eventContext.setStopFurtherProcessing(true)
    

    or

    <expression-component>
        app.registry.yourflowName.stop();
      </expression-component>
    

    if you are looking to stop the messages to go to your flow, you can also use filters.