SlideShare a Scribd company logo
1 of 13
Mule with Velocity
Have you ever wondered how to send an email through Mule Esb with a well designed format and
where you can pick up some dynamic values from properties file and designed your email from a
pre defined template and design in a colourful format with colourful text and logos ??
Yes you can design that email for your customers, subscribers or anybody else you wish to.
Mule can trigger mail with a pre defined template where you can design the body of your email with
different HTML tags and put various texts, text colour, images, logos in your email body and also pic
some dynamic values in it.
To design the template you only need a minimum knowledge of HTML tags and can design the
template easily.
Yes .. I am talking about Mule with Velocity template for your mail ..
Before we start, we will see what is Velocity template.
Velocity is an open source templating tool developed by an international volunteer community and
hosted by the Apache Software Foundation's Jakarta Project.
You can find more information on it here :- https://velocity.apache.org/engine/releases/velocity-
1.5/user-guide.html#what_is_velocity
To integrate Velocity template with Mule you will find good examples over net.
There is already example by great David Dossot of using Velocity transformer class here :-
https://muleinaction.googlecode.com/svn-history/r490/branches/mule-3/chapter05/velocity-
transformer/src/main/java/com/muleinaction/transformer/MarkingVelocityMessageTransformer.jav
a
I have just modified the code and reused it as per my requirement
So, we first need a Velocity transformer Java class as following :-
This class will set the email payload, map the external dynamic values with the email
So, we will also have external values from properties files as following :-
These values from properties file will make the Velocity template dynamic as it will pick the values form here
and set to the mail body .. Values like customer or subscriber name can be defined here dynamically
So, we will also have external values from properties files as following :-
Here you can see, file is picked up by the flow and the file content is set as message body of the email along with
other dynamic values from external properties file
And finally our Velocity template is as following :-
Here you can see the HTML codes like <p/>, <img/> <html> tags are used to design the email content .. Also, values
like $FileName, $Subscriber are picked from properties file.
Also $payload is the content from the inbound file and it is appended with this mail body.
Isn’t these are dynamic !!!!
Let’s test our application now.. Let’s place a file in the inbound folder with a content say This message is from a
file !!! And start our application … we will see the console as following :-
You can see the email has been send successfully and the email body as a preview in the log ..
Now let’s check our actual email
Here is the mail we received from Mule with Velocity template and here what we got :-
You can see different text formats, bold texts , images , logos etc that was designed in Velocity template with
HTML codes. Also, you can see the values are picked from properties file
So, here you can see how to set a email body colourful and dynamic using Mule and Velocity
template !!!….
In my next slide I will bring some other techniques in Mule implementation .
Hope you have enjoyed this simpler version.
Keep sharing your knowledge and let our Mule community grow 
Mule with velocity

More Related Content

What's hot

mulesoft at a glance
mulesoft at a glancemulesoft at a glance
mulesoft at a glanceKhasim Saheb
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in muleMohammed246
 
Mulesoft idempotent Message Filter
Mulesoft idempotent Message FilterMulesoft idempotent Message Filter
Mulesoft idempotent Message Filterkumar gaurav
 
Mule concepts
Mule conceptsMule concepts
Mule conceptsSindhu VL
 
Mule - beginners guide
Mule - beginners guideMule - beginners guide
Mule - beginners guideSindhu VL
 
Mulesoft at a glance
Mulesoft at a glance Mulesoft at a glance
Mulesoft at a glance mdfkhan625
 
Stored procedure in Mule
Stored procedure in MuleStored procedure in Mule
Stored procedure in MuleKhasim Saheb
 
A Short Introduction of Mule ESB
A Short Introduction of Mule ESBA Short Introduction of Mule ESB
A Short Introduction of Mule ESBSwapnil Sahu
 
Using flows for service orchestration
Using flows for service orchestrationUsing flows for service orchestration
Using flows for service orchestrationSindhu VL
 

What's hot (15)

mulesoft at a glance
mulesoft at a glancemulesoft at a glance
mulesoft at a glance
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule technology
Mule technologyMule technology
Mule technology
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in mule
 
Webservice vm in mule
Webservice vm in muleWebservice vm in mule
Webservice vm in mule
 
Mule velocity
Mule velocityMule velocity
Mule velocity
 
Mulesoft idempotent Message Filter
Mulesoft idempotent Message FilterMulesoft idempotent Message Filter
Mulesoft idempotent Message Filter
 
VM example in mule
VM example in muleVM example in mule
VM example in mule
 
Mule concepts
Mule conceptsMule concepts
Mule concepts
 
Mule - beginners guide
Mule - beginners guideMule - beginners guide
Mule - beginners guide
 
Mulesoft at a glance
Mulesoft at a glance Mulesoft at a glance
Mulesoft at a glance
 
Stored procedure in Mule
Stored procedure in MuleStored procedure in Mule
Stored procedure in Mule
 
A Short Introduction of Mule ESB
A Short Introduction of Mule ESBA Short Introduction of Mule ESB
A Short Introduction of Mule ESB
 
Using flows for service orchestration
Using flows for service orchestrationUsing flows for service orchestration
Using flows for service orchestration
 
Mule soa
Mule soaMule soa
Mule soa
 

Viewers also liked

Mule Cloud Connectors-Conceptos Basicos
Mule Cloud Connectors-Conceptos BasicosMule Cloud Connectors-Conceptos Basicos
Mule Cloud Connectors-Conceptos BasicosManuel Antonio
 
Mule Cloud Connectors-Guardando y restaurando el estado o auth
Mule Cloud Connectors-Guardando y restaurando el estado o authMule Cloud Connectors-Guardando y restaurando el estado o auth
Mule Cloud Connectors-Guardando y restaurando el estado o authManuel Antonio
 
Mule Cloud Connectors1-Conectores
Mule Cloud Connectors1-ConectoresMule Cloud Connectors1-Conectores
Mule Cloud Connectors1-ConectoresManuel Antonio
 
Mule cloud connectors1-conectores
Mule cloud connectors1-conectoresMule cloud connectors1-conectores
Mule cloud connectors1-conectoresManuel Antonio
 
Mule esb teste parte 2
Mule esb teste   parte 2Mule esb teste   parte 2
Mule esb teste parte 2Jeison Barros
 
Mule Cloud Connector-Conectividad OAuth
Mule Cloud Connector-Conectividad OAuthMule Cloud Connector-Conectividad OAuth
Mule Cloud Connector-Conectividad OAuthManuel Antonio
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocityRajkattamuri
 
Mule cloudhub application
Mule cloudhub applicationMule cloudhub application
Mule cloudhub applicationD.Rajesh Kumar
 
Mule Cloud Connectors-Configuracion OAuth
Mule Cloud Connectors-Configuracion OAuthMule Cloud Connectors-Configuracion OAuth
Mule Cloud Connectors-Configuracion OAuthManuel Antonio
 
Mule Cloud Connector-Personalizando Callback
Mule Cloud Connector-Personalizando CallbackMule Cloud Connector-Personalizando Callback
Mule Cloud Connector-Personalizando CallbackManuel Antonio
 
Estudo de caso: Mule como um transporte JMS Comum
Estudo de caso: Mule como um transporte JMS ComumEstudo de caso: Mule como um transporte JMS Comum
Estudo de caso: Mule como um transporte JMS ComumJeison Barros
 
Como criar um http proxy dinamico com mule parte 3
Como criar um http proxy dinamico com mule   parte 3Como criar um http proxy dinamico com mule   parte 3
Como criar um http proxy dinamico com mule parte 3Jeison Barros
 
Como criar um http proxy dinamico com mule parte 1
Como criar um http proxy dinamico com mule   parte 1Como criar um http proxy dinamico com mule   parte 1
Como criar um http proxy dinamico com mule parte 1Jeison Barros
 
Mule with velocity
Mule with velocity Mule with velocity
Mule with velocity mdfkhan625
 
Xslt with mule
Xslt with muleXslt with mule
Xslt with muleSon Nguyen
 
Sap integration by mule esb
Sap integration by mule esbSap integration by mule esb
Sap integration by mule esbSon Nguyen
 
Query in share point by mule
Query in share point by muleQuery in share point by mule
Query in share point by muleSon Nguyen
 

Viewers also liked (20)

Mule Cloud Connectors-Conceptos Basicos
Mule Cloud Connectors-Conceptos BasicosMule Cloud Connectors-Conceptos Basicos
Mule Cloud Connectors-Conceptos Basicos
 
Mule Cloud Connectors-Guardando y restaurando el estado o auth
Mule Cloud Connectors-Guardando y restaurando el estado o authMule Cloud Connectors-Guardando y restaurando el estado o auth
Mule Cloud Connectors-Guardando y restaurando el estado o auth
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocity
 
Mule Cloud Connectors1-Conectores
Mule Cloud Connectors1-ConectoresMule Cloud Connectors1-Conectores
Mule Cloud Connectors1-Conectores
 
Mule cloud connectors1-conectores
Mule cloud connectors1-conectoresMule cloud connectors1-conectores
Mule cloud connectors1-conectores
 
Mule esb teste parte 2
Mule esb teste   parte 2Mule esb teste   parte 2
Mule esb teste parte 2
 
Mule Cloud Connector-Conectividad OAuth
Mule Cloud Connector-Conectividad OAuthMule Cloud Connector-Conectividad OAuth
Mule Cloud Connector-Conectividad OAuth
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocity
 
Mule cloudhub application
Mule cloudhub applicationMule cloudhub application
Mule cloudhub application
 
Mule Cloud Connectors-Configuracion OAuth
Mule Cloud Connectors-Configuracion OAuthMule Cloud Connectors-Configuracion OAuth
Mule Cloud Connectors-Configuracion OAuth
 
Ruby in mule
Ruby in muleRuby in mule
Ruby in mule
 
Mule Cloud Connector-Personalizando Callback
Mule Cloud Connector-Personalizando CallbackMule Cloud Connector-Personalizando Callback
Mule Cloud Connector-Personalizando Callback
 
Estudo de caso: Mule como um transporte JMS Comum
Estudo de caso: Mule como um transporte JMS ComumEstudo de caso: Mule como um transporte JMS Comum
Estudo de caso: Mule como um transporte JMS Comum
 
Como criar um http proxy dinamico com mule parte 3
Como criar um http proxy dinamico com mule   parte 3Como criar um http proxy dinamico com mule   parte 3
Como criar um http proxy dinamico com mule parte 3
 
Como criar um http proxy dinamico com mule parte 1
Como criar um http proxy dinamico com mule   parte 1Como criar um http proxy dinamico com mule   parte 1
Como criar um http proxy dinamico com mule parte 1
 
Mule with velocity
Mule with velocity Mule with velocity
Mule with velocity
 
Muleesb
MuleesbMuleesb
Muleesb
 
Xslt with mule
Xslt with muleXslt with mule
Xslt with mule
 
Sap integration by mule esb
Sap integration by mule esbSap integration by mule esb
Sap integration by mule esb
 
Query in share point by mule
Query in share point by muleQuery in share point by mule
Query in share point by mule
 

Similar to Mule with velocity

Email configuration in mule esb
Email configuration in mule esbEmail configuration in mule esb
Email configuration in mule esbVamsi Krishna
 
What is html xml and xhtml
What is html xml and xhtmlWhat is html xml and xhtml
What is html xml and xhtmlFkdiMl
 
Automatic documantation with mule
Automatic documantation with mule Automatic documantation with mule
Automatic documantation with mule AbdulImrankhan7
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with muleF K
 
Automatic documentation with mule
Automatic documentation with mule Automatic documentation with mule
Automatic documentation with mule javeed_mhd
 
Automatic documantation with mule
Automatic documantation with mule Automatic documantation with mule
Automatic documantation with mule mdfkhan625
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with muleMohammed246
 
Automatic documantation with mule
Automatic documantation with mule Automatic documantation with mule
Automatic documantation with mule Khasim Saheb
 
Automatic documantation with mule
Automatic documantation with muleAutomatic documantation with mule
Automatic documantation with muleSunil Komarapu
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with muleHasan Syed
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esbAnand kalla
 

Similar to Mule with velocity (20)

Mule with velocity
Mule with velocityMule with velocity
Mule with velocity
 
Dynamic file attribute
Dynamic file attributeDynamic file attribute
Dynamic file attribute
 
Email configuration in mule esb
Email configuration in mule esbEmail configuration in mule esb
Email configuration in mule esb
 
What is html xml and xhtml
What is html xml and xhtmlWhat is html xml and xhtml
What is html xml and xhtml
 
Automatic documantation with mule
Automatic documantation with mule Automatic documantation with mule
Automatic documantation with mule
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with mule
 
Automatic documentation with mule
Automatic documentation with mule Automatic documentation with mule
Automatic documentation with mule
 
Automatic documantation with mule
Automatic documantation with mule Automatic documantation with mule
Automatic documantation with mule
 
Documantation with mule
Documantation with mule Documantation with mule
Documantation with mule
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with mule
 
Automatic documantation with mule
Automatic documantation with mule Automatic documantation with mule
Automatic documantation with mule
 
Joomla tempates talk
Joomla tempates talkJoomla tempates talk
Joomla tempates talk
 
Automatic documantation with mule
Automatic documantation with muleAutomatic documantation with mule
Automatic documantation with mule
 
Mule
MuleMule
Mule
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with mule
 
Presentation 1 [autosaved]
Presentation 1 [autosaved]Presentation 1 [autosaved]
Presentation 1 [autosaved]
 
Mule connectors-session1
Mule connectors-session1Mule connectors-session1
Mule connectors-session1
 
Trigger Emails BigD17
Trigger Emails BigD17Trigger Emails BigD17
Trigger Emails BigD17
 
Automatic documentation with mule
Automatic documentation with mule Automatic documentation with mule
Automatic documentation with mule
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
 

More from javeed_mhd

For each component in mule
For each component in muleFor each component in mule
For each component in mulejaveed_mhd
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mulejaveed_mhd
 
File component in mule
File component in muleFile component in mule
File component in mulejaveed_mhd
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mulejaveed_mhd
 
Choice component in mule
Choice component in muleChoice component in mule
Choice component in mulejaveed_mhd
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mulejaveed_mhd
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mulejaveed_mhd
 
Quartz component in mule
Quartz component in muleQuartz component in mule
Quartz component in mulejaveed_mhd
 
Mule management console installation
Mule management console installation Mule management console installation
Mule management console installation javeed_mhd
 
Mule esb made system integration easy
Mule esb made system integration easy Mule esb made system integration easy
Mule esb made system integration easy javeed_mhd
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mulejaveed_mhd
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo javeed_mhd
 
How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint javeed_mhd
 
How to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudioHow to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudiojaveed_mhd
 
Mapping and listing with mule
Mapping and listing with mule Mapping and listing with mule
Mapping and listing with mule javeed_mhd
 
Mule any point exchange
Mule any point exchangeMule any point exchange
Mule any point exchangejaveed_mhd
 
Mule esb api layer
Mule esb api layer Mule esb api layer
Mule esb api layer javeed_mhd
 
Mule Maven Plugin
Mule Maven PluginMule Maven Plugin
Mule Maven Pluginjaveed_mhd
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripejaveed_mhd
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedurejaveed_mhd
 

More from javeed_mhd (20)

For each component in mule
For each component in muleFor each component in mule
For each component in mule
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
File component in mule
File component in muleFile component in mule
File component in mule
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Choice component in mule
Choice component in muleChoice component in mule
Choice component in mule
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mule
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
 
Quartz component in mule
Quartz component in muleQuartz component in mule
Quartz component in mule
 
Mule management console installation
Mule management console installation Mule management console installation
Mule management console installation
 
Mule esb made system integration easy
Mule esb made system integration easy Mule esb made system integration easy
Mule esb made system integration easy
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo
 
How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint
 
How to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudioHow to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudio
 
Mapping and listing with mule
Mapping and listing with mule Mapping and listing with mule
Mapping and listing with mule
 
Mule any point exchange
Mule any point exchangeMule any point exchange
Mule any point exchange
 
Mule esb api layer
Mule esb api layer Mule esb api layer
Mule esb api layer
 
Mule Maven Plugin
Mule Maven PluginMule Maven Plugin
Mule Maven Plugin
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
 

Recently uploaded

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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Recently uploaded (20)

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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

Mule with velocity

  • 2. Have you ever wondered how to send an email through Mule Esb with a well designed format and where you can pick up some dynamic values from properties file and designed your email from a pre defined template and design in a colourful format with colourful text and logos ?? Yes you can design that email for your customers, subscribers or anybody else you wish to. Mule can trigger mail with a pre defined template where you can design the body of your email with different HTML tags and put various texts, text colour, images, logos in your email body and also pic some dynamic values in it. To design the template you only need a minimum knowledge of HTML tags and can design the template easily. Yes .. I am talking about Mule with Velocity template for your mail ..
  • 3.
  • 4. Before we start, we will see what is Velocity template. Velocity is an open source templating tool developed by an international volunteer community and hosted by the Apache Software Foundation's Jakarta Project. You can find more information on it here :- https://velocity.apache.org/engine/releases/velocity- 1.5/user-guide.html#what_is_velocity To integrate Velocity template with Mule you will find good examples over net. There is already example by great David Dossot of using Velocity transformer class here :- https://muleinaction.googlecode.com/svn-history/r490/branches/mule-3/chapter05/velocity- transformer/src/main/java/com/muleinaction/transformer/MarkingVelocityMessageTransformer.jav a I have just modified the code and reused it as per my requirement
  • 5. So, we first need a Velocity transformer Java class as following :- This class will set the email payload, map the external dynamic values with the email
  • 6. So, we will also have external values from properties files as following :- These values from properties file will make the Velocity template dynamic as it will pick the values form here and set to the mail body .. Values like customer or subscriber name can be defined here dynamically
  • 7. So, we will also have external values from properties files as following :- Here you can see, file is picked up by the flow and the file content is set as message body of the email along with other dynamic values from external properties file
  • 8. And finally our Velocity template is as following :- Here you can see the HTML codes like <p/>, <img/> <html> tags are used to design the email content .. Also, values like $FileName, $Subscriber are picked from properties file. Also $payload is the content from the inbound file and it is appended with this mail body. Isn’t these are dynamic !!!!
  • 9. Let’s test our application now.. Let’s place a file in the inbound folder with a content say This message is from a file !!! And start our application … we will see the console as following :- You can see the email has been send successfully and the email body as a preview in the log .. Now let’s check our actual email
  • 10. Here is the mail we received from Mule with Velocity template and here what we got :- You can see different text formats, bold texts , images , logos etc that was designed in Velocity template with HTML codes. Also, you can see the values are picked from properties file
  • 11. So, here you can see how to set a email body colourful and dynamic using Mule and Velocity template !!!….
  • 12. In my next slide I will bring some other techniques in Mule implementation . Hope you have enjoyed this simpler version. Keep sharing your knowledge and let our Mule community grow 