SlideShare a Scribd company logo
1 of 22
1
November 17, 2022
Mysore MuleSoft Meetup
Hosting a website using a MuleSoft Application
Safe Harbour Statement
● Both the speaker and the host are organizing this meet-up in individual capacity only. We are
not representing our companies here.
● This presentation is strictly for learning purposes only. Organizer/Presenter do not hold any
responsibility that same solution will work for your business requirements.
● This presentation is not meant for any promotional activities.
3
A recording of this meetup will be uploaded to events page within 24 hours.
Questions can be submitted/asked at any time in the Chat/Questions & Answers Tab.
Make it more Interactive!!!
Give us feedback! Rate this meetup session by filling feedback form at the end of the day.
We Love Feedbacks!!! Its Bread & Butter for Meetup.
Housekeeping
4
Introduction
● About the Organizers
5
Shubham Chaurasia
Billennium India
Professional Integration Developer
A SHOW OF HANDS:
Who is new to this Meetup?
Giridhar Meka
Sr. Technical Architect
 Certified MuleSoft Developer
 4 years of Total Experience, 3+ years in MuleSoft
 Working as a Senior MuleSoft Developer at HashedIn By
Deloitte
Speaker
6
Prithwish Karforma
Senior MuleSoft Developer
7
● Introductions
 Using MuleSoft as a host for web pages
 What is HTTP load static resource on Studio?
 How can we leverage it to create dynamic webpages?
● Demonstration and code walkthrough
● Trivia
● Wrap-Up
Agenda
 MuleSoft allows us to package and host website content
 Once deployed to CloudHub or Anypoint Platform, the website becomes
accessible to end-user
 We can parse HTML and inject DataWeave snippets within the code to make the
response page dynamic
 Provide a visual response to the end-user in the form of a web-page rather than
the usual JSON/CSV/XML response body.
MuleSoft as a web server
8
 Belongs to the HTTP module
 Locates and loads the static content to the Mule runtime
 Static content includes home page or a script
 Parameters to be configured:
HTTP Load Static Resource
9
Resource base path Path of the static resource
Default file
Default file name
Example – index.html
Attributes Default Mule attribute object
 Process a template and obtain the results
 A template in this context is any text with
embedded DataWeave scripts in them
 These texts are parsed, the scripts replaced
by their results
 It belongs to the core module
 Parameters to be configured:
Parse Template
10
Content If not using an external file as template, put file content here
Location If referenced external file, path should be provided here
Steps to create basic web server
11
Step 1: Set up basic flow with HTTP Listener followed by Load static resource
Step 2: The HTTP Listener Configuration shall be reused later
Step 3: For Load Static Resource parameters, ensure the base path is a project path (app.home)
so that it works after deployment to CloudHub
Steps to create basic web server
12
Step 4: Set up a flow with HTTP Listener with the same Listener configuration as mentioned in Step 2,
but with a different path.
Step 5: Set up the DataWeave snippet to insert in to the HTML code
Step 6: Set up the HTML code and put the variable name with the DataWeave snippet
Capturing data from responsive webpage
13
 When using a form in HTML, the input tag can be used to pass parameters.
 They are passed as ‘application/x-www-form-urlencoded’ media-type within query parameters
 Upon type casting it to ‘application/json’ we can use them in our Mule code
Capturing data from responsive webpage
14
 Similarly, values from lists/options tags in HTML within a form are passed as payload
 They are passed as ‘application/x-www-form-urlencoded’ media-type
 Upon type casting it to ‘application/json’ we can use them in our Mule code
References
 Load Static Resource Doc:
https://docs.mulesoft.com/http-connector/1.7/http-load-static-res-task
 Parse Template Doc:
https://docs.mulesoft.com/mule-runtime/4.4/parse-template-reference
 CloudHub Connector Doc:
https://docs.mulesoft.com/cloudhub-connector/1.1/
24
Setbacks Faced
Since this implementation is through HTTP listener, we tried, but in vain, to implement
a RAML based solution. In doing so, MuleSoft could not load the required HTML, JS
and CSS scripts required to build the webpages
25
Demo
Q&A
Take a stand !
19
● Nominate yourself for the next meetup speaker and suggest a topic as well.
20
● Share:
○ Tweet using the hashtag #MuleSoftMeetups
○ Join Mysore Group: https://meetups.mulesoft.com/mysore/
● Feedback:
○ Fill out the survey feedback and suggest topics for upcoming events
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program
○ Reach out to Mysore Meetup Leaders (Shubham/Giridhar) to suggest topics
for next Meetup
What’s next?
Get ready to WIN a MuleSoft Voucher from MuleSoft
Quiz Time
Thank you

More Related Content

Similar to Create Dynamic Pages with MuleSoft | MuleSoft Mysore Meetup #11

Do the following when responding to the attach paper· Read my p.docx
Do the following when responding to the attach paper· Read my p.docxDo the following when responding to the attach paper· Read my p.docx
Do the following when responding to the attach paper· Read my p.docx
elinoraudley582231
 
Collaboration Portal for Researchers
Collaboration Portal for ResearchersCollaboration Portal for Researchers
Collaboration Portal for Researchers
Fatemeh Khast Khoda
 

Similar to Create Dynamic Pages with MuleSoft | MuleSoft Mysore Meetup #11 (20)

flask.pptx
flask.pptxflask.pptx
flask.pptx
 
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
 
MicroForntends.pdf
MicroForntends.pdfMicroForntends.pdf
MicroForntends.pdf
 
Ajaykumar_last
Ajaykumar_lastAjaykumar_last
Ajaykumar_last
 
student supervision system
student supervision systemstudent supervision system
student supervision system
 
Unleash the Solace Pub Sub connector | Banaglore MuleSoft Meetup #31
Unleash the Solace Pub Sub connector | Banaglore MuleSoft Meetup #31Unleash the Solace Pub Sub connector | Banaglore MuleSoft Meetup #31
Unleash the Solace Pub Sub connector | Banaglore MuleSoft Meetup #31
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
MCA 6th Sem Project Report
MCA 6th Sem Project ReportMCA 6th Sem Project Report
MCA 6th Sem Project Report
 
Do the following when responding to the attach paper· Read my p.docx
Do the following when responding to the attach paper· Read my p.docxDo the following when responding to the attach paper· Read my p.docx
Do the following when responding to the attach paper· Read my p.docx
 
Progressive Web Apps - deep dive
Progressive Web Apps - deep diveProgressive Web Apps - deep dive
Progressive Web Apps - deep dive
 
WebSphere Portlet Factory: Davalen’s Practical Advice from the Field
WebSphere Portlet Factory: Davalen’s Practical Advice from the Field WebSphere Portlet Factory: Davalen’s Practical Advice from the Field
WebSphere Portlet Factory: Davalen’s Practical Advice from the Field
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive Forms
 
sveltekit-en.pdf
sveltekit-en.pdfsveltekit-en.pdf
sveltekit-en.pdf
 
Collaboration Portal for Researchers
Collaboration Portal for ResearchersCollaboration Portal for Researchers
Collaboration Portal for Researchers
 
Company Visitor Management System Report.docx
Company Visitor Management System Report.docxCompany Visitor Management System Report.docx
Company Visitor Management System Report.docx
 
How to build and deploy app on Replit
How to build and deploy app on ReplitHow to build and deploy app on Replit
How to build and deploy app on Replit
 
MuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptx
MuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptxMuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptx
MuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptx
 
#10 Calicut Mulesoft Meetup - Maven And Mule.pptx
#10 Calicut Mulesoft Meetup - Maven And Mule.pptx#10 Calicut Mulesoft Meetup - Maven And Mule.pptx
#10 Calicut Mulesoft Meetup - Maven And Mule.pptx
 
West Yorkshire Mulesoft Meetup #6
West Yorkshire Mulesoft Meetup #6West Yorkshire Mulesoft Meetup #6
West Yorkshire Mulesoft Meetup #6
 
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
 

More from MysoreMuleSoftMeetup

MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
MysoreMuleSoftMeetup
 

More from MysoreMuleSoftMeetup (20)

MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore ...
MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore ...MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore ...
MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore ...
 
Munits in Mule 4 [Deep-Dive] | MuleSoft Mysore Meetup #40
Munits in Mule 4 [Deep-Dive] | MuleSoft Mysore Meetup #40Munits in Mule 4 [Deep-Dive] | MuleSoft Mysore Meetup #40
Munits in Mule 4 [Deep-Dive] | MuleSoft Mysore Meetup #40
 
Unlocking Seamless End-to-End Automation with the MuleSoft Automation Suite |...
Unlocking Seamless End-to-End Automation with the MuleSoft Automation Suite |...Unlocking Seamless End-to-End Automation with the MuleSoft Automation Suite |...
Unlocking Seamless End-to-End Automation with the MuleSoft Automation Suite |...
 
State Management in Mule applications | MuleSoft Mysore Meetup #42
State Management in Mule applications |  MuleSoft Mysore Meetup #42State Management in Mule applications |  MuleSoft Mysore Meetup #42
State Management in Mule applications | MuleSoft Mysore Meetup #42
 
Anypoint Code Builder (ACB) + AI + Hands-On | MuleSoft Mysore Meetup #41
Anypoint Code Builder (ACB) + AI + Hands-On |  MuleSoft Mysore Meetup #41Anypoint Code Builder (ACB) + AI + Hands-On |  MuleSoft Mysore Meetup #41
Anypoint Code Builder (ACB) + AI + Hands-On | MuleSoft Mysore Meetup #41
 
Transaction Management in Mule 4 | MuleSoft Mysore Meetup #39
Transaction Management in Mule 4 |  MuleSoft Mysore Meetup #39Transaction Management in Mule 4 |  MuleSoft Mysore Meetup #39
Transaction Management in Mule 4 | MuleSoft Mysore Meetup #39
 
Exploring the realms of MuleSoft RPA | MuleSoft Mysore Meetup #38
Exploring the realms of MuleSoft RPA | MuleSoft Mysore Meetup #38Exploring the realms of MuleSoft RPA | MuleSoft Mysore Meetup #38
Exploring the realms of MuleSoft RPA | MuleSoft Mysore Meetup #38
 
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
 
Azure DevOps Pipeline setup for Mule APIs #36
Azure DevOps Pipeline setup for Mule APIs #36Azure DevOps Pipeline setup for Mule APIs #36
Azure DevOps Pipeline setup for Mule APIs #36
 
Mastering the Puzzle Integration Patterns Decoded | MuleSoft Mysore Meetup #35
Mastering the Puzzle Integration Patterns Decoded | MuleSoft Mysore Meetup #35Mastering the Puzzle Integration Patterns Decoded | MuleSoft Mysore Meetup #35
Mastering the Puzzle Integration Patterns Decoded | MuleSoft Mysore Meetup #35
 
Discovering Seamless Integration: MuleSoft, AWS and Snowflake | MuleSoft Myso...
Discovering Seamless Integration: MuleSoft, AWS and Snowflake | MuleSoft Myso...Discovering Seamless Integration: MuleSoft, AWS and Snowflake | MuleSoft Myso...
Discovering Seamless Integration: MuleSoft, AWS and Snowflake | MuleSoft Myso...
 
Application Design Thinking wrt Integration Architecture - Part II | MuleSoft...
Application Design Thinking wrt Integration Architecture - Part II | MuleSoft...Application Design Thinking wrt Integration Architecture - Part II | MuleSoft...
Application Design Thinking wrt Integration Architecture - Part II | MuleSoft...
 
HL7 Integration using Mulesoft | MuleSoft Mysore Meetp #32
HL7 Integration using Mulesoft | MuleSoft Mysore Meetp #32HL7 Integration using Mulesoft | MuleSoft Mysore Meetp #32
HL7 Integration using Mulesoft | MuleSoft Mysore Meetp #32
 
Application Design Thinking wrt Integration Architecture - Part I | MuleSoft ...
Application Design Thinking wrt Integration Architecture - Part I | MuleSoft ...Application Design Thinking wrt Integration Architecture - Part I | MuleSoft ...
Application Design Thinking wrt Integration Architecture - Part I | MuleSoft ...
 
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
 
Platform configuration on CloudHub 2.0 | MuleSoft Mysore Meetup #29
Platform configuration on CloudHub 2.0 | MuleSoft Mysore Meetup #29Platform configuration on CloudHub 2.0 | MuleSoft Mysore Meetup #29
Platform configuration on CloudHub 2.0 | MuleSoft Mysore Meetup #29
 
MuleSoft Integration with ChatGPT — Part 1 | MuleSoft Mysore Meetup #27
MuleSoft Integration with ChatGPT — Part 1 | MuleSoft Mysore Meetup #27MuleSoft Integration with ChatGPT — Part 1 | MuleSoft Mysore Meetup #27
MuleSoft Integration with ChatGPT — Part 1 | MuleSoft Mysore Meetup #27
 
Handling NFRs for the API through API policies (Custom Policies) -Part 2 | Mu...
Handling NFRs for the API through API policies (Custom Policies) -Part 2 | Mu...Handling NFRs for the API through API policies (Custom Policies) -Part 2 | Mu...
Handling NFRs for the API through API policies (Custom Policies) -Part 2 | Mu...
 
Handling NFRs for the API through OoTB API policies Part-1 | MuleSoft Mysore ...
Handling NFRs for the API through OoTB API policies Part-1 | MuleSoft Mysore ...Handling NFRs for the API through OoTB API policies Part-1 | MuleSoft Mysore ...
Handling NFRs for the API through OoTB API policies Part-1 | MuleSoft Mysore ...
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 

Create Dynamic Pages with MuleSoft | MuleSoft Mysore Meetup #11

  • 1. 1
  • 2. November 17, 2022 Mysore MuleSoft Meetup Hosting a website using a MuleSoft Application
  • 3. Safe Harbour Statement ● Both the speaker and the host are organizing this meet-up in individual capacity only. We are not representing our companies here. ● This presentation is strictly for learning purposes only. Organizer/Presenter do not hold any responsibility that same solution will work for your business requirements. ● This presentation is not meant for any promotional activities. 3
  • 4. A recording of this meetup will be uploaded to events page within 24 hours. Questions can be submitted/asked at any time in the Chat/Questions & Answers Tab. Make it more Interactive!!! Give us feedback! Rate this meetup session by filling feedback form at the end of the day. We Love Feedbacks!!! Its Bread & Butter for Meetup. Housekeeping 4
  • 5. Introduction ● About the Organizers 5 Shubham Chaurasia Billennium India Professional Integration Developer A SHOW OF HANDS: Who is new to this Meetup? Giridhar Meka Sr. Technical Architect
  • 6.  Certified MuleSoft Developer  4 years of Total Experience, 3+ years in MuleSoft  Working as a Senior MuleSoft Developer at HashedIn By Deloitte Speaker 6 Prithwish Karforma Senior MuleSoft Developer
  • 7. 7 ● Introductions  Using MuleSoft as a host for web pages  What is HTTP load static resource on Studio?  How can we leverage it to create dynamic webpages? ● Demonstration and code walkthrough ● Trivia ● Wrap-Up Agenda
  • 8.  MuleSoft allows us to package and host website content  Once deployed to CloudHub or Anypoint Platform, the website becomes accessible to end-user  We can parse HTML and inject DataWeave snippets within the code to make the response page dynamic  Provide a visual response to the end-user in the form of a web-page rather than the usual JSON/CSV/XML response body. MuleSoft as a web server 8
  • 9.  Belongs to the HTTP module  Locates and loads the static content to the Mule runtime  Static content includes home page or a script  Parameters to be configured: HTTP Load Static Resource 9 Resource base path Path of the static resource Default file Default file name Example – index.html Attributes Default Mule attribute object
  • 10.  Process a template and obtain the results  A template in this context is any text with embedded DataWeave scripts in them  These texts are parsed, the scripts replaced by their results  It belongs to the core module  Parameters to be configured: Parse Template 10 Content If not using an external file as template, put file content here Location If referenced external file, path should be provided here
  • 11. Steps to create basic web server 11 Step 1: Set up basic flow with HTTP Listener followed by Load static resource Step 2: The HTTP Listener Configuration shall be reused later Step 3: For Load Static Resource parameters, ensure the base path is a project path (app.home) so that it works after deployment to CloudHub
  • 12. Steps to create basic web server 12 Step 4: Set up a flow with HTTP Listener with the same Listener configuration as mentioned in Step 2, but with a different path. Step 5: Set up the DataWeave snippet to insert in to the HTML code Step 6: Set up the HTML code and put the variable name with the DataWeave snippet
  • 13. Capturing data from responsive webpage 13  When using a form in HTML, the input tag can be used to pass parameters.  They are passed as ‘application/x-www-form-urlencoded’ media-type within query parameters  Upon type casting it to ‘application/json’ we can use them in our Mule code
  • 14. Capturing data from responsive webpage 14  Similarly, values from lists/options tags in HTML within a form are passed as payload  They are passed as ‘application/x-www-form-urlencoded’ media-type  Upon type casting it to ‘application/json’ we can use them in our Mule code
  • 15. References  Load Static Resource Doc: https://docs.mulesoft.com/http-connector/1.7/http-load-static-res-task  Parse Template Doc: https://docs.mulesoft.com/mule-runtime/4.4/parse-template-reference  CloudHub Connector Doc: https://docs.mulesoft.com/cloudhub-connector/1.1/ 24
  • 16. Setbacks Faced Since this implementation is through HTTP listener, we tried, but in vain, to implement a RAML based solution. In doing so, MuleSoft could not load the required HTML, JS and CSS scripts required to build the webpages 25
  • 17. Demo
  • 18. Q&A
  • 19. Take a stand ! 19 ● Nominate yourself for the next meetup speaker and suggest a topic as well.
  • 20. 20 ● Share: ○ Tweet using the hashtag #MuleSoftMeetups ○ Join Mysore Group: https://meetups.mulesoft.com/mysore/ ● Feedback: ○ Fill out the survey feedback and suggest topics for upcoming events ○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program ○ Reach out to Mysore Meetup Leaders (Shubham/Giridhar) to suggest topics for next Meetup What’s next?
  • 21. Get ready to WIN a MuleSoft Voucher from MuleSoft Quiz Time