SlideShare a Scribd company logo
São Paulo MuleSoft Meetup Group
Code reusability with Mule Shared Flows
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
●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
Code reusability with Mule Shared
Flows
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
6
What are Shared Flows?
MULE APPLICATION 1 MULE APPLICATION 2
REPOSITORY
MULE PLUGIN
MULE PLUGIN
Dependency
MULE PLUGIN
Dependency
CTRL + C...
CTRL + V:
7
API LED Connectivity and Shared Flows
EXP
PRC
SYS
MULE-PLUGIN
REPOSITORY
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
● 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
● 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?
11
How to manage dependencies?
MULE PLUGIN
MULE APPLICATION 1
DEPENDENCIES
<SCOPE>PROVIDED</SCOPE>
MULE PLUGIN
MULE APPLICATION 2
DEPENDENCIES
MULE PLUGIN
Demo
13
Shared Flows - Demo
customers-papi
users-papi
14
Shared Flows - Demo
Questions / Comments
16
● MuleSoft Training:
○ Anypoint Platform Development: Production-Ready Development Practices
(Mule 4)
● MuleSoft Documentation:
○ Flows and Subflows
○ Flow and Subflow scopes
Reference
Thank you

More Related Content

PPTX
São Paulo MuleSoft Meetup - 31 Jan
PPTX
Ahmadabad mule soft_meetup_17april2021_mule4_cryptography
PPTX
Ahmadabad mule soft_meetup_6march2021_azure_CICD
PPTX
São Paulo MuleSoft Meetup - Messaging patterns
PPT
Impact Of A Cms Framework Change - Holland Open Netherlands
PPTX
Bhopal mule soft_meetup_17july2021_azuredevopsintegration_mulesoft
PPTX
Ahmadabad mule soft_meetup_20_february_2021_muleconnectordevelopment
PDF
MuleSoft meetup__houston #13
São Paulo MuleSoft Meetup - 31 Jan
Ahmadabad mule soft_meetup_17april2021_mule4_cryptography
Ahmadabad mule soft_meetup_6march2021_azure_CICD
São Paulo MuleSoft Meetup - Messaging patterns
Impact Of A Cms Framework Change - Holland Open Netherlands
Bhopal mule soft_meetup_17july2021_azuredevopsintegration_mulesoft
Ahmadabad mule soft_meetup_20_february_2021_muleconnectordevelopment
MuleSoft meetup__houston #13

What's hot (20)

PPTX
MuleSoft Kochi Meetup #5– Handling Mule Exceptions
PPTX
Nagpur Mulesoft Meetup on CICD using Jenkins
PPTX
Bhopal mule soft_meetup#2_18sept2021_cloudhubdr_strategy_bestpractices
PPTX
São Paulo MuleSoft Meetup - Deployments Models
PPTX
Mumbai MuleSoft Meetup #17 - GraphQL
PPTX
Custom MuleSoft connector using Java SDK
PPTX
Indore MuleSoft Meetup #4 : Demystifying Error Handling & Snowflake Integration
PPTX
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
PPTX
Meetup - Automate your project lifecycle using MuleSoft and Azure DevOps
PPTX
Mulesoft KL Meetup 2
PPTX
11th Manila MuleSoft Meetup Dec 2021
PPTX
Introduction to MuleSoft
PPTX
Meetup en español #4 - MuleSoft para profesionales de Java
PDF
20210916 mule soft_meetup_nz_online_uploadedversion
PPTX
Mumbai MuleSoft Meetup #15
PPTX
Baltimore july2021 final
PPTX
Online spanish meetup #2
PDF
MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With ...
PPTX
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)
PPTX
9th Manila MuleSoft Meetup July 2021
MuleSoft Kochi Meetup #5– Handling Mule Exceptions
Nagpur Mulesoft Meetup on CICD using Jenkins
Bhopal mule soft_meetup#2_18sept2021_cloudhubdr_strategy_bestpractices
São Paulo MuleSoft Meetup - Deployments Models
Mumbai MuleSoft Meetup #17 - GraphQL
Custom MuleSoft connector using Java SDK
Indore MuleSoft Meetup #4 : Demystifying Error Handling & Snowflake Integration
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Meetup - Automate your project lifecycle using MuleSoft and Azure DevOps
Mulesoft KL Meetup 2
11th Manila MuleSoft Meetup Dec 2021
Introduction to MuleSoft
Meetup en español #4 - MuleSoft para profesionales de Java
20210916 mule soft_meetup_nz_online_uploadedversion
Mumbai MuleSoft Meetup #15
Baltimore july2021 final
Online spanish meetup #2
MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With ...
Meetup en español #6 - MuleSoft para profesionales de Java (segunda edición)
9th Manila MuleSoft Meetup July 2021
Ad

Similar to MuleSoft MuleSoft Meetup - Shared Flows (20)

PPTX
Srilekha mule esb
PPTX
Mule in a nutshell
PPTX
Mule esb overview
PPT
Mule esb presentation 2015
PPT
Mulethenewtechnology 12549172699166-phpapp03-160421133841
PPT
Mule technology
 
PPT
Mule technology
PPT
Mule technology
PPTX
Mule slides
PPTX
PPTX
Sai mule esb batch
PPTX
ESB Online Training Part 2
PPT
Mule ESB
PPTX
PPTX
Ashok mule esb
PDF
Introduction to mule application
PPTX
Mule esb
PPTX
Mule esb kranthi
PPTX
Esb process
PPTX
Mule esb kranthi
Srilekha mule esb
Mule in a nutshell
Mule esb overview
Mule esb presentation 2015
Mulethenewtechnology 12549172699166-phpapp03-160421133841
Mule technology
 
Mule technology
Mule technology
Mule slides
Sai mule esb batch
ESB Online Training Part 2
Mule ESB
Ashok mule esb
Introduction to mule application
Mule esb
Mule esb kranthi
Esb process
Mule esb kranthi
Ad

More from Guilherme Pereira Silva (11)

PPTX
Extending the Mule Runtime - Building a Circuit Breaker Component.pptx
PPTX
#2 Building your first connector extending the Mule Java SDK
PDF
MuleSoft Composer - Online Portuguese Meetup Group
PPTX
Building APIs with Mule and Spring Boot
PPTX
São Paulo MuleSoft Meetup - Unwired API Led & Custom Polices
PPTX
São Paulo MuleSoft Meetups - DevOps
PPTX
Mulesoft Meetup Latam Summit Brazil
PPTX
São Paulo MuleSoft Meetup #5 - Runtime Fabric
PPTX
MuleSoft Meetup São Paulo #4 - November
PPTX
MuleSoft São Paulo Meetup #3 - 18 Jun
PPTX
Managing APIs with MuleSoft
Extending the Mule Runtime - Building a Circuit Breaker Component.pptx
#2 Building your first connector extending the Mule Java SDK
MuleSoft Composer - Online Portuguese Meetup Group
Building APIs with Mule and Spring Boot
São Paulo MuleSoft Meetup - Unwired API Led & Custom Polices
São Paulo MuleSoft Meetups - DevOps
Mulesoft Meetup Latam Summit Brazil
São Paulo MuleSoft Meetup #5 - Runtime Fabric
MuleSoft Meetup São Paulo #4 - November
MuleSoft São Paulo Meetup #3 - 18 Jun
Managing APIs with MuleSoft

Recently uploaded (20)

PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Machine Learning_overview_presentation.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Electronic commerce courselecture one. Pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Tartificialntelligence_presentation.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Getting Started with Data Integration: FME Form 101
PPTX
Big Data Technologies - Introduction.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
A Presentation on Artificial Intelligence
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Machine Learning_overview_presentation.pptx
Assigned Numbers - 2025 - Bluetooth® Document
Digital-Transformation-Roadmap-for-Companies.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Electronic commerce courselecture one. Pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Tartificialntelligence_presentation.pptx
Spectral efficient network and resource selection model in 5G networks
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Advanced methodologies resolving dimensionality complications for autism neur...
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
“AI and Expert System Decision Support & Business Intelligence Systems”
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Per capita expenditure prediction using model stacking based on satellite ima...
Getting Started with Data Integration: FME Form 101
Big Data Technologies - Introduction.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
A Presentation on Artificial Intelligence

MuleSoft MuleSoft Meetup - Shared Flows

  • 1. São Paulo MuleSoft Meetup Group Code reusability with Mule Shared Flows
  • 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
  • 4. Code reusability with Mule Shared Flows
  • 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
  • 6. 6 What are Shared Flows? MULE APPLICATION 1 MULE APPLICATION 2 REPOSITORY MULE PLUGIN MULE PLUGIN Dependency MULE PLUGIN Dependency CTRL + C... CTRL + V:
  • 7. 7 API LED Connectivity and Shared Flows EXP PRC SYS MULE-PLUGIN REPOSITORY
  • 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?
  • 11. 11 How to manage dependencies? MULE PLUGIN MULE APPLICATION 1 DEPENDENCIES <SCOPE>PROVIDED</SCOPE> MULE PLUGIN MULE APPLICATION 2 DEPENDENCIES MULE PLUGIN
  • 12. Demo
  • 13. 13 Shared Flows - Demo customers-papi users-papi
  • 16. 16 ● MuleSoft Training: ○ Anypoint Platform Development: Production-Ready Development Practices (Mule 4) ● MuleSoft Documentation: ○ Flows and Subflows ○ Flow and Subflow scopes Reference