Choice, Scatter-Gather Router & Foreach in Mule 4

on

|

views

and

comments

Dear #Trailblazers,

Welcome back, this is the Episode #3 of Mulesoft ranger series and we are going to learn about below topics. Find the agenda for Mulesoft Series Episode #3

Subflow in Mule 4

subflow is a scope that enables you to group event processors in a manner similar to that of a flow, but with certain differences and limitations:

  • Subflows do not have event sources.
  • Subflows do not have an error handling scope.
  • During design, subflows work as macros that replace the Flow Reference components that call them.
    When you build the application, all Flow Reference components that call a subflow are replaced by the contents of the referenced subflow.
  • Referencing subflows results in better performance than referencing a flow.

Choice Router in Mule 4

The Choice router dynamically routes messages through a flow according to a set of DataWeave expressions that evaluate message content. 

Image copyrights to mulesoft.com

Choice Router Schematic
Image copyrights to mulesoft.com
Image copyrights to mulesoft.com

Scatter-Gather Router in Mule 4

The routing message processor Scatter-Gather sends a request message to multiple targets concurrently. It collects the responses from all routes, and aggregates them into a single message.

Image copyrights to mulesoft.com
Image copyrights to mulesoft.com

Example: Flight Booking

When you try to bool a flight, you have to enter source, destination and the dates. After clicking on search you many results from various airlines. So to get the data and make it faster ( improve the performance ), behind the scenes all the request are being made in parallel

Connect with Database in mule 4 using connector check this Link.

Image copyrights to mulesoft.com
Image copyrights to mulesoft.com

For Each in mulesoft Mule 4

The For Each scope splits a payload into elements and processes them one by one through the components that you place in the scope. It is similar to a for-each/for loop code block in most programming languages and can process any collection, including lists and arrays. The collection can be any supported content type, such as application/jsonapplication/java, or application/xml.

Here is the full video for your reference

Resources

  1. https://docs.mulesoft.com/
  2. http://training.mulesoft.com/
  3. https://www.mulesoft.com/resources/covid-19
  4. https://dzone.com/ for Mulesoft
  5. SFDCPanther YouTube channel
  6. Tech Lightning YouTube channel

Happy Learning. #KeepSharing #KeepLearning #AskPanther

Sharing is caring 🙂

Amit Singh
Amit Singhhttps://www.pantherschools.com/
Amit Singh aka @sfdcpanther/pantherschools, a Salesforce Technical Architect, Consultant with over 8+ years of experience in Salesforce technology. 21x Certified. Blogger, Speaker, and Instructor. DevSecOps Champion
Share this

Leave a review

Excellent

SUBSCRIBE-US

Book a 1:1 Call

Must-read

How to Utilize Salesforce CLI sf (v2)

The Salesforce CLI is not just a tool; it’s the cornerstone of development on the Salesforce Platform. It’s your go-to for building, testing, deploying, and more. As one of the most important development tools in our ecosystem

Save the day of a Developer with Apex Log Analyzer

Table of Contents What is Apex Log Analyzer? Apex Log Analyzer, a tool designed with Salesforce developers in mind, is here to simplify and accelerate your...

Salesforce PodCast

Introduction Hey Everyone, Welcome to my podcast, the first-ever podcast in India for Salesforce professionals. Achievement We are happy to announce that we have been selected as Top...

Recent articles

More like this

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

5/5

Stuck in coding limbo?

Our courses unlock your tech potential