Mule flows and subflows
-
Upload
cong-thanh-nguyen -
Category
Technology
-
view
163 -
download
1
Transcript of Mule flows and subflows
Mule Flows and Subflows
Introduction
• a Mule application begins processing a message it receives at an inbound endpoint in a flow
• implement all processing stages• route the message to other flows or subflows
to perform specific tasks
Standard Synchronous Flow
Standard Asynchronous Flow
Advantages of Using Multiple Flows
• Asynchronous Flow B can perform time-consuming tasks
• Flow A and Flow B can respond differently to errors
• easier to read• he processing actions in a flows or subflows
can be called and used by multiple flows
Advantages of Using Multiple Flows
• allows for load balancing between nodes and higher performance of application
Types of Flows• Subflow
– processes messages synchronously– always inherits both the processing strategy and exception strategy
employed
Types of Flows• Synchronous Flow
– processes messages synchronously– does not inherit processing or exception strategies from the triggering
flow
Types of Flows• Asynchronous Flow
– An asynchronous flow simultaneously and asynchronously processes messages in parallel
– does not inherit processing or exception strategies from the triggering flow
– processes messages along multiple threads
Types of Flows
Subflows
• always run synchronously• using a subflow to complete some message
processing activities
Subflows
• isolate logical processing blocks, making the graphical view more intuitive and the underlying XML code much easier to read
• ideally suited for code reuse• inherit the processing strategies and exception
strategies of the flow that triggers it
Subflows
Synchronous Flows
• processes messages synchronously relative to the flow that triggered it
• you can set the synchronous flow’s processing and exception strategies to behave differently from the exception strategy you configured for the flow(s)
Synchronous Flows
• can accept calls from multiple flows within an application using its own processing and exception strategies
Synchronous Flows
Synchronous Message Processing
Asynchronous Flows
Triggering FlowsType of Flow Component Execution
Relativeto Triggering Flow
Exception andProcessing Strategies
Subflow Flow Reference
synchronous inherited
Synchronous Flow
Flow Reference
synchronous not inherited
Asynchronous Flow
Flow Reference wrapped within an Async Scope
asynchronous not inherited
Question and answer