Mule flows and subflows

20
Mule Flows and Subflows

Transcript of Mule flows and subflows

Page 1: Mule flows and subflows

Mule Flows and Subflows

Page 2: 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

Page 3: Mule flows and subflows

Standard Synchronous Flow

Page 4: Mule flows and subflows

Standard Asynchronous Flow

Page 5: Mule flows and subflows

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

Page 6: Mule flows and subflows

Advantages of Using Multiple Flows

• allows for load balancing between nodes and higher performance of application

Page 7: Mule flows and subflows

Types of Flows• Subflow

– processes messages synchronously– always inherits both the processing strategy and exception strategy

employed

Page 8: Mule flows and subflows

Types of Flows• Synchronous Flow

– processes messages synchronously– does not inherit processing or exception strategies from the triggering

flow

Page 9: Mule flows and subflows

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

Page 10: Mule flows and subflows

Types of Flows

Page 11: Mule flows and subflows

Subflows

• always run synchronously• using a subflow to complete some message

processing activities

Page 12: Mule flows and subflows

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

Page 13: Mule flows and subflows

Subflows

Page 14: Mule flows and 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)

Page 15: Mule flows and subflows

Synchronous Flows

• can accept calls from multiple flows within an application using its own processing and exception strategies

Page 16: Mule flows and subflows

Synchronous Flows

Page 17: Mule flows and subflows

Synchronous Message Processing

Page 18: Mule flows and subflows

Asynchronous Flows

Page 19: Mule flows and subflows

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

Page 20: Mule flows and subflows

Question and answer