SlideShare a Scribd company logo
1 of 20
MULE FLOW ELEMENTS
 Building upon the information presented
in Mule Concepts, this section offers more
detailed descriptions of the different types of
message sources and message processors,
and what they do within a Mule flow.
Elements :
 Anypoint Connectors receive or send
messages between Mule and one or more
external sources, such as files, databases, or
Web services. Connectors can act as
message sources by working as inbound
endpoints, they can act as a message
processor that performs an operation in middle
of a flow, or they can fall at the end of a flow
and act as the recipient of the final payload
data.
 Connectors in Mule are either endpoint-
based or operation-based. Endpoint-based
connectors follow either a one-way or request-
response exchange pattern and are often (but
not always) named and based around a
standard data communication protocol, such
as FTP, JMS, and SMTP. Operation-based
connectors follow an information exchange
pattern based on the operation that you select
and are often (but not always) named and
based around one or more specific third-party
APIs.
Endpoint-Based
Connectors :
Endpoint-based connectors
are configured as either
inbound or outbound
endpoints in a flow.
Inbound endpoints serve as
a message source for a
flow. Outbound endpoints
can occur mid-flow or at the
end of flows, and send
information to external
systems.
Operation-Based Connectors
When you add an operation-based
connector to your flow, you
immediately define a specific
operation for that connector to
perform.
The XML element of the connector
differs according to the operation that
you select, taking the
form <connectorName>:<operation>.
For
example, sfdc:query orsfdc:upsert-
bulk. The remaining configuration
 Components are message processors which
execute business logic on messages. They
enable you to perform specific actions without
writing any Mule-specific code. You can drop a
component – a POJO, Spring bean, Java
bean, or script – into a flow to perform almost
any customized task within your Mule
application. For example, you can use a
component to verify that items on an invoice
are in stock in a warehouse, or to update a
database with a customer’s order history.
Scripting Components
Mule includes
several scripting
components that you can use
in flows to execute custom
business logic. These
components enable you to
drop a chunk of custom-
written logic into your flow to
act upon messages.
The example below illustrates
the use of a Groovy script
component. The script uses
the value of state to determine
Web Service
Components
Also included are two components
to facilitate exposing, consuming,
and proxying Web services. The
CXF component leverages the CXF
framework Mule uses to support
SOAP Web services; the REST
component works with Jersey to
support RESTful Web services;
both are bound to HTTP.
HTTP Component
Further, Mule provides an HTTP
component to facilitate working
with calls over HTTP. Use
the HTTP Static Resource
Handler to easily serve up
static content when called.
Other Components
 Use a Logger component to log
activities in the flow as they occur.
 Use an Expression component to
evaluate a particular expression upon a
message in a flow.
 Use an Invoke component to invoke the
method of an object specified with a
Mule expression.
 Use an Echo component to return the
payload of a message as a call
response.
 Use a Flow Ref component to access
another flow from within a flow.
 Use a Batch Execute component to kick
off processing of a batch job.
 Mule provides numerous options for handling errors. Errors,
or faults, that occur within Mule are referred to
as exceptions; when an activity in your Mule instance fails,
Mule throws an exception. To manage these exceptions, Mule
allows you to configure exception strategies.
 Mule’s default exception strategy — which implicitly applies to
all Mule applications — manages errors (such as, thrown
exceptions) in Mule flows. When your flows require more
sophisticated error management, you can implement one or
more exception strategies to construct precise, efficient
protocols for handling errors.
 From a high level perspective, errors that occur in Mule fall
into one of two categories: System Exceptions,
and Messaging Exceptions.
System Exceptions :
 Mule invokes a System Exception Strategy when an exception is
thrown at the system-level (i.e., when no message is involved,
exceptions are handled by system exception strategies). For
example, system exception strategies handle exceptions that occur:
 During application start-up
 When a connection to an external system fails
 When a system exception occurs, Mule sends an exception
notification to registered listeners, logs the exception, and — if the
exception was caused by a connection failure — executes
the reconnection strategy. System Exception Strategies are not
configurable in Mule.
 As an example, imagine Mule establishes a connection to a JMS
broker in order to receive a message. When Mule attempts to use
the connection to consume a message the connection fails, which
causes Mule to invoke the system exception strategy. Because the
failure occurred before any message was received for processing,
Mule invoked the system, rather than messaging, exception
strategy.
Messaging Exceptions :
 Mule invokes a Messaging Exception
Strategy whenever an exception is thrown within
a flow. Whenever a message is involved,
exceptions are handled by messaging exception
strategies.
 When a message being processed through a
Mule flow throws an exception, normal flow
execution stops. Mule transfers the message to
the message processor sequence within the
exception strategy. You can incorporate any
number of message processors into an exception
strategy to handle the exception precisely as you
wish. The diagram below illustrates what happens
when a message throws an exception.
 In a Mule flow, a Transformer prepares a message
for further processing by enhancing or altering the
contents of the message properties, variables, or
payload. Data transformation is one of the most
powerful functionalities of Mule: rather than
spending a lot of time building a customized
connection between resources or processors, you
can just use a pre-built transformer to perform a
standard data conversion. For example, if the
message source in a flow receives data in XML
format, but a downstream message processor
expects a Java object, you can use an XML-to-
Object transformer to convert the format of the
message payload.
Transformer Library :
 Out of the box, Mule provides a set of standard
transformers to handle the most common data
transformation scenarios. Typically, these elements
require minimal configuration so as to facilitate quick
construction of applications that must juggle different
data formats between resources and processors. If
Mule doesn’t have the particular transformer you
need, you can arrange several transformers in a
sequence to achieve the output you need. For
example, if you need to implement an A-to-C
transformation but no such transformer exists, you
can arrange a sequence – A-to-B, B-to-C – which
effectively simulates an A-to-C transformer. For
example, to convert XML to JSON, use an XML-to-
Object transformer followed by an Object-to-JSON
transformer.
 Building upon the information presented
in Mule Concepts, this section offers more
detailed descriptions of the different types of
message sources and message processors,
and what they do within a Mule flow.
ThankYou!!!!!!!!!

More Related Content

What's hot

Controlling Message Flow - Mule ESB
Controlling Message Flow - Mule ESBControlling Message Flow - Mule ESB
Controlling Message Flow - Mule ESBMani Rathnam Gudi
 
About mule transformers
About mule transformersAbout mule transformers
About mule transformersprudhvivreddy
 
Choice router mule
Choice router   muleChoice router   mule
Choice router muleSindhu VL
 
Mule JMS Transport
Mule JMS TransportMule JMS Transport
Mule JMS TransportRupesh Sinha
 
Clustering concepts
Clustering conceptsClustering concepts
Clustering conceptsbapiraju
 
Mule enricher component
Mule enricher component Mule enricher component
Mule enricher component Gandham38
 
Mule Schema Validation Filter
Mule Schema Validation FilterMule Schema Validation Filter
Mule Schema Validation FilterAnkush Sharma
 
Batch processing
Batch processingBatch processing
Batch processingbapiraju
 
Lect 07 data replication
Lect 07 data replicationLect 07 data replication
Lect 07 data replicationBilal khan
 
Working with components
Working with componentsWorking with components
Working with componentsprudhvivreddy
 
Mule Message Chunk Aggregator
Mule Message Chunk AggregatorMule Message Chunk Aggregator
Mule Message Chunk AggregatorAnkush Sharma
 
Mule splitters
Mule splittersMule splitters
Mule splittersGandham38
 
What is the difference between using private flow
What is the difference between using private flowWhat is the difference between using private flow
What is the difference between using private flowSon Nguyen
 

What's hot (20)

Controlling Message Flow - Mule ESB
Controlling Message Flow - Mule ESBControlling Message Flow - Mule ESB
Controlling Message Flow - Mule ESB
 
About mule transformers
About mule transformersAbout mule transformers
About mule transformers
 
Mule esb transformers
Mule esb transformersMule esb transformers
Mule esb transformers
 
Choice router mule
Choice router   muleChoice router   mule
Choice router mule
 
Mule JMS Transport
Mule JMS TransportMule JMS Transport
Mule JMS Transport
 
Clustering concepts
Clustering conceptsClustering concepts
Clustering concepts
 
Mule enricher component
Mule enricher component Mule enricher component
Mule enricher component
 
Mule Schema Validation Filter
Mule Schema Validation FilterMule Schema Validation Filter
Mule Schema Validation Filter
 
Batch processing
Batch processingBatch processing
Batch processing
 
Lect 07 data replication
Lect 07 data replicationLect 07 data replication
Lect 07 data replication
 
Working with components
Working with componentsWorking with components
Working with components
 
Mule Message Chunk Aggregator
Mule Message Chunk AggregatorMule Message Chunk Aggregator
Mule Message Chunk Aggregator
 
How to use attachment transformer
How to use attachment transformerHow to use attachment transformer
How to use attachment transformer
 
Mule splitters
Mule splittersMule splitters
Mule splitters
 
Mule enricher
Mule enricher Mule enricher
Mule enricher
 
Mule jms
Mule   jmsMule   jms
Mule jms
 
Ashok mule esb
Ashok mule esbAshok mule esb
Ashok mule esb
 
Scopes in mule
Scopes in muleScopes in mule
Scopes in mule
 
What is the difference between using private flow
What is the difference between using private flowWhat is the difference between using private flow
What is the difference between using private flow
 
Mule splitters
Mule splittersMule splitters
Mule splitters
 

Similar to Elements in a muleflow

Similar to Elements in a muleflow (20)

Mule concepts
Mule conceptsMule concepts
Mule concepts
 
Mule fundamentals
Mule fundamentalsMule fundamentals
Mule fundamentals
 
Mule architecture
Mule   architectureMule   architecture
Mule architecture
 
Mule architecture
Mule   architectureMule   architecture
Mule architecture
 
Mule ESB Interview or Certification questions
Mule ESB Interview or Certification questionsMule ESB Interview or Certification questions
Mule ESB Interview or Certification questions
 
Mule esb presentation 2015
Mule esb presentation 2015Mule esb presentation 2015
Mule esb presentation 2015
 
Top 50 MuleSoft interview questions
Top 50 MuleSoft interview questionsTop 50 MuleSoft interview questions
Top 50 MuleSoft interview questions
 
Mule ESB Tutorial Part 2
Mule ESB Tutorial Part 2Mule ESB Tutorial Part 2
Mule ESB Tutorial Part 2
 
Srilekha mule esb
Srilekha mule esbSrilekha mule esb
Srilekha mule esb
 
Mule esb kranthi
Mule esb kranthiMule esb kranthi
Mule esb kranthi
 
Mule esb kranthi
Mule esb kranthiMule esb kranthi
Mule esb kranthi
 
Mule esb
Mule esb Mule esb
Mule esb
 
Mule
MuleMule
Mule
 
Esb process
Esb processEsb process
Esb process
 
Mule
MuleMule
Mule
 
Sai mule esb batch
Sai mule esb batchSai mule esb batch
Sai mule esb batch
 
Ashok mule esb
Ashok mule esbAshok mule esb
Ashok mule esb
 
Mule slides
Mule slides Mule slides
Mule slides
 
Mule esb naveen
Mule esb naveenMule esb naveen
Mule esb naveen
 
Niranjan mule esb
Niranjan mule esbNiranjan mule esb
Niranjan mule esb
 

More from Thang Loi

Mule web services
Mule web servicesMule web services
Mule web servicesThang Loi
 
Mule enterprise service bus
Mule enterprise service busMule enterprise service bus
Mule enterprise service busThang Loi
 
File connector
File connectorFile connector
File connectorThang Loi
 
Box connector
Box connectorBox connector
Box connectorThang Loi
 
Amazon S3 connector
Amazon S3 connectorAmazon S3 connector
Amazon S3 connectorThang Loi
 
Mule flows and subflows
Mule flows and subflowsMule flows and subflows
Mule flows and subflowsThang Loi
 
Http connector
Http connectorHttp connector
Http connectorThang Loi
 
File Connector
File ConnectorFile Connector
File ConnectorThang Loi
 
Mule transform
Mule transformMule transform
Mule transformThang Loi
 
Fpt connector
Fpt connectorFpt connector
Fpt connectorThang Loi
 
Mule transformers
Mule transformersMule transformers
Mule transformersThang Loi
 
Http connector
Http connectorHttp connector
Http connectorThang Loi
 
Mule mongodb connector
Mule mongodb connectorMule mongodb connector
Mule mongodb connectorThang Loi
 
Mule message state
Mule message stateMule message state
Mule message stateThang Loi
 
Mule schedule
Mule scheduleMule schedule
Mule scheduleThang Loi
 
Mule concepts
Mule conceptsMule concepts
Mule conceptsThang Loi
 

More from Thang Loi (20)

Mule web services
Mule web servicesMule web services
Mule web services
 
Mule enterprise service bus
Mule enterprise service busMule enterprise service bus
Mule enterprise service bus
 
File connector
File connectorFile connector
File connector
 
Box connector
Box connectorBox connector
Box connector
 
Amazon S3 connector
Amazon S3 connectorAmazon S3 connector
Amazon S3 connector
 
Mule flows and subflows
Mule flows and subflowsMule flows and subflows
Mule flows and subflows
 
Http connector
Http connectorHttp connector
Http connector
 
Tcat server
Tcat serverTcat server
Tcat server
 
File Connector
File ConnectorFile Connector
File Connector
 
Mule transform
Mule transformMule transform
Mule transform
 
Fpt connector
Fpt connectorFpt connector
Fpt connector
 
Mule transformers
Mule transformersMule transformers
Mule transformers
 
Http connector
Http connectorHttp connector
Http connector
 
Mule mongodb connector
Mule mongodb connectorMule mongodb connector
Mule mongodb connector
 
Mule message state
Mule message stateMule message state
Mule message state
 
Mule maven
Mule mavenMule maven
Mule maven
 
Mule soap
Mule soapMule soap
Mule soap
 
Mule schedule
Mule scheduleMule schedule
Mule schedule
 
Mule flows
Mule flowsMule flows
Mule flows
 
Mule concepts
Mule conceptsMule concepts
Mule concepts
 

Recently uploaded

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Elements in a muleflow

  • 2.  Building upon the information presented in Mule Concepts, this section offers more detailed descriptions of the different types of message sources and message processors, and what they do within a Mule flow.
  • 4.  Anypoint Connectors receive or send messages between Mule and one or more external sources, such as files, databases, or Web services. Connectors can act as message sources by working as inbound endpoints, they can act as a message processor that performs an operation in middle of a flow, or they can fall at the end of a flow and act as the recipient of the final payload data.
  • 5.  Connectors in Mule are either endpoint- based or operation-based. Endpoint-based connectors follow either a one-way or request- response exchange pattern and are often (but not always) named and based around a standard data communication protocol, such as FTP, JMS, and SMTP. Operation-based connectors follow an information exchange pattern based on the operation that you select and are often (but not always) named and based around one or more specific third-party APIs.
  • 6. Endpoint-Based Connectors : Endpoint-based connectors are configured as either inbound or outbound endpoints in a flow. Inbound endpoints serve as a message source for a flow. Outbound endpoints can occur mid-flow or at the end of flows, and send information to external systems.
  • 7. Operation-Based Connectors When you add an operation-based connector to your flow, you immediately define a specific operation for that connector to perform. The XML element of the connector differs according to the operation that you select, taking the form <connectorName>:<operation>. For example, sfdc:query orsfdc:upsert- bulk. The remaining configuration
  • 8.  Components are message processors which execute business logic on messages. They enable you to perform specific actions without writing any Mule-specific code. You can drop a component – a POJO, Spring bean, Java bean, or script – into a flow to perform almost any customized task within your Mule application. For example, you can use a component to verify that items on an invoice are in stock in a warehouse, or to update a database with a customer’s order history.
  • 9. Scripting Components Mule includes several scripting components that you can use in flows to execute custom business logic. These components enable you to drop a chunk of custom- written logic into your flow to act upon messages. The example below illustrates the use of a Groovy script component. The script uses the value of state to determine
  • 10. Web Service Components Also included are two components to facilitate exposing, consuming, and proxying Web services. The CXF component leverages the CXF framework Mule uses to support SOAP Web services; the REST component works with Jersey to support RESTful Web services; both are bound to HTTP.
  • 11. HTTP Component Further, Mule provides an HTTP component to facilitate working with calls over HTTP. Use the HTTP Static Resource Handler to easily serve up static content when called.
  • 12. Other Components  Use a Logger component to log activities in the flow as they occur.  Use an Expression component to evaluate a particular expression upon a message in a flow.  Use an Invoke component to invoke the method of an object specified with a Mule expression.  Use an Echo component to return the payload of a message as a call response.  Use a Flow Ref component to access another flow from within a flow.  Use a Batch Execute component to kick off processing of a batch job.
  • 13.  Mule provides numerous options for handling errors. Errors, or faults, that occur within Mule are referred to as exceptions; when an activity in your Mule instance fails, Mule throws an exception. To manage these exceptions, Mule allows you to configure exception strategies.  Mule’s default exception strategy — which implicitly applies to all Mule applications — manages errors (such as, thrown exceptions) in Mule flows. When your flows require more sophisticated error management, you can implement one or more exception strategies to construct precise, efficient protocols for handling errors.  From a high level perspective, errors that occur in Mule fall into one of two categories: System Exceptions, and Messaging Exceptions.
  • 14. System Exceptions :  Mule invokes a System Exception Strategy when an exception is thrown at the system-level (i.e., when no message is involved, exceptions are handled by system exception strategies). For example, system exception strategies handle exceptions that occur:  During application start-up  When a connection to an external system fails  When a system exception occurs, Mule sends an exception notification to registered listeners, logs the exception, and — if the exception was caused by a connection failure — executes the reconnection strategy. System Exception Strategies are not configurable in Mule.  As an example, imagine Mule establishes a connection to a JMS broker in order to receive a message. When Mule attempts to use the connection to consume a message the connection fails, which causes Mule to invoke the system exception strategy. Because the failure occurred before any message was received for processing, Mule invoked the system, rather than messaging, exception strategy.
  • 15. Messaging Exceptions :  Mule invokes a Messaging Exception Strategy whenever an exception is thrown within a flow. Whenever a message is involved, exceptions are handled by messaging exception strategies.  When a message being processed through a Mule flow throws an exception, normal flow execution stops. Mule transfers the message to the message processor sequence within the exception strategy. You can incorporate any number of message processors into an exception strategy to handle the exception precisely as you wish. The diagram below illustrates what happens when a message throws an exception.
  • 16.
  • 17.  In a Mule flow, a Transformer prepares a message for further processing by enhancing or altering the contents of the message properties, variables, or payload. Data transformation is one of the most powerful functionalities of Mule: rather than spending a lot of time building a customized connection between resources or processors, you can just use a pre-built transformer to perform a standard data conversion. For example, if the message source in a flow receives data in XML format, but a downstream message processor expects a Java object, you can use an XML-to- Object transformer to convert the format of the message payload.
  • 18. Transformer Library :  Out of the box, Mule provides a set of standard transformers to handle the most common data transformation scenarios. Typically, these elements require minimal configuration so as to facilitate quick construction of applications that must juggle different data formats between resources and processors. If Mule doesn’t have the particular transformer you need, you can arrange several transformers in a sequence to achieve the output you need. For example, if you need to implement an A-to-C transformation but no such transformer exists, you can arrange a sequence – A-to-B, B-to-C – which effectively simulates an A-to-C transformer. For example, to convert XML to JSON, use an XML-to- Object transformer followed by an Object-to-JSON transformer.
  • 19.  Building upon the information presented in Mule Concepts, this section offers more detailed descriptions of the different types of message sources and message processors, and what they do within a Mule flow.