2. What is a Flow?
● A flow starts at inbound point for example http
● In Mule, everything start with a message which goes
through a flow
● A flow can either complete the process by itself or pass it
to other flow or subflow
Inbound
point A
Message
processing
Flow ends
3. Advantages of Using Flow in Mule
● When you want to execute Asynchronous flow, you have to break it different
flow
Flow A Processing Flow Ends
Flow B Processing Flow Ends
4. Advantages of Using Flow in Mule
● When we want to execute different error based on type of
flow
● Divides your flow in different flow makes your application
modular and easier to maintain
● A subflow can be called multiple times within an
application
● In case of asynchronous flow, when you deploy on Mule
clusters; It will help you to load balance the execution.
6. SubFlow
● Pass control from main flow to another flow
● Execution will be synchronous
● It inherit message strategy and exception
strategy from parent flow
● Encourages you to keep business logic
separate from view logic
8. Synchronous flow
● Flow execution is synchronous same as subflow
● It does not inhering processing strategy and exception
from parent
● You can configure a subflow own processing strategy and
exception
10. Difference between subflow and Synchronous flow
● The flow execution is same in both flow but as
Synchronous flow does not inherit processing
strategy and exception from parent , so multiple flow
can call it.
● In case of Subflow only calling parent can call it
● You create subflow when it is specific to a flow
● You create synchronous flow when you want to use
11. Asynchronous flow
● A main flow can call Asynchronous flow
● Async flow does not have to pass data back to main flow
and hence it continue to execute with the main flow
● Async flow has it own processing strategy and exception
● Async flow can be call multiple time by same flow