2
votes

I have a synchronous Webservice (WSDL First JAX-WS Service) as inbound endpoint. i have some business logic for which i have a separate flow which invokes another Webservice which is one-way. The problem which i am facing is that after the main flow invokes the business-logic flow it is expecting a response from the business logic flow. I read Mule documentation regarding this and found out that Mule Flows take up the behavior of the source endpoint. So in my case the source is synchronous endpoint thus the flow getting invoked also gets synchronous behavior. i tried to change the Flow strategy to asynchronous but it makes the flow invalid. Please suggest on how to invoke a flow in fire and forget pattern from within another flow

3
It might help to post your code. Simon and Dylan's answers both look good to me with the information you posted.Ryan Hoegg

3 Answers

5
votes

What you want to use is probably the async scope.

<queued-asynchronous-processing-strategy name="async_processing_strategy" maxThreads="16"/>

<flow>
...
    <async processingStrategy="async_processing_strategy">
        <flow-ref name="verySlowFlow"/>
    </async>
...
</flow>
3
votes

It sounds like one solution to your issue might be to incorporate the use one-way (asynchronous) vm/jms queues to trigger your second flow.

The first flow would have an outbound connector and the second flow would have an inbound connector.

Does that help? If not, post your xml so we can better understand your problem.

1
votes

You could try reliability pattern. This will help to decouple the inbound reception and processing .

https://docs.mulesoft.com/mule-management-console/v/3.7/reliability-patterns