Sunday, 9 February 2020

Mule 4 - Hello World


Use the following instructions to create a sample Hello World flow.


  1. Open Anypoint studio. 
  2. Select New --> Mule Project
  3. Provide project name - Hello World
  4. Add connector configurations
    1. Under general tab select protocol as http
    2. Host as localhost
    3. Port 8081 or any available port. 
    4. Base path as /learnings
    5. select ok. 
  5. Give path value as /helloworld
  6. Go to advanced options
  7. Add allowed methods ad GET
  8. Save connector configurations. 
  9. In right side design pallet select core component and drag and drop logger component
  10. Give some message - Example Flow Initiated. 
  11. Add Set Payload component to map the response 
  12. Select switch to literal mode. 
  13. Select Show Graphical view. 
  14. Add the following response. 
  15. Following command sends the response in JSON format. 

output application/json
---
{
responseMessage:"Hello Welcome to Mule"
}