2. 2
● Introductions
● Code reusability with Mule Shared Flows: Concepts
● Reusable Code: Pros and Cons
● Demo - How to implement Mule Shared Flows
● Questions / Comments
Agenda
3. 3
●About me:
○ José Luis Clua (15+ in IT)
○ Company: Capgemini
○ Natural e residente de São josé dos Campos – SP
○ Formado em Ciência da Computação na UNIVAP em 2005
○ 4+ years Integration experience
○ 2+ years with MuleSoft
○ MCD (MuleSoft Certified Developer)
Introductions
5. 5
What are Flows?
A flow is a pipeline of message processors.
Flows consist of 3 parts:
• Event Source
• Process
• Error Handling
A private flow is a flow that can’t be accessed from
outside the Mule app because it has no source
defined.
A subflow has no Event Source and no Error
Handling scope.
XML FILE
MULE APPLICATION
8. 8
● Shared Flows (a.k.a. Common Flows or Global Flows):
○ Flows that we can shared across multiple applications
○ Shared Flows are created in Mule Plugin projects
○ Mule Plugins can host many Shared Flows
○ Mule Plugins can be published in external repositories (Exchange, Jfrog,
Nexus, etc)
○ Mule Plugins can be added as a library (dependency in POM file)
What are Shared Flows?
9. 9
● PROS
○ Code reusability (DRY principle – Don´t Repeat Yourself)
○ Easier maintainability
○ Faster development
○ Saving runtime resources
○ Promote code standards
○ Creating Project Templates
● CONS
○ Can lead to unflexible solutions
○ Demand efficient testing and version control
○ Can create a new layer of complexity
Reusable Code: Pros and Cons
10. 10
● Shared Flows are well suited for basic, common, repetitive funtionality such as:
○ Error Handling
○ API health check
○ Logging
○ Caching
○ Data lookup
○ Simple tasks that are repetitive
When use Shared Flows?