First flow
Exercise
Section titled “Exercise”Create an empty Mulesoft project called “mulesoft-curso-basico-ejercicio-1” where, in the XML file (if there is none, create a Mule Configuration File), you will do
the following:
Create two flows,
- The first one will have a
Schedulerand aFlow-Referencepointing at the second flow. - The second flow will only have a
Loggerwith the messageHola Mundo!
The expected process flow would be this one:
- Start
- Scheduler
- Flow Reference
- Subflow
- Logger
- End
Swipe to see the whole flow
Note: start and end are illustrative only.
- Remember that every component, flow,
Sourceoperation andProcessoperation lives in the Mule palette. - Since the first flow holds a
Scheduler, which is aSource, it has to be aFlow. - Since the second flow only has a Logger, which is a
Process, and has noSource, that flow should be asubflow.
Show solution
Copy and paste this into a new Mule XML file to see the solution.
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsdhttp://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd"> <flow name="mulesoft-curso-basico-1Flow" doc:id="37065e24-cb66-4799-8c3a-ed4fced5e31f" > <scheduler doc:name="Scheduler" doc:id="31aa124f-b8f0-4770-a97f-8f3c00541817" > <scheduling-strategy > <fixed-frequency frequency="999999999" timeUnit="DAYS" startDelay="999999999"/> </scheduling-strategy> </scheduler> <flow-ref doc:name="mulesoft-curso-basico-1Sub_Flow" doc:id="d518daa8-d0b7-4562-bcaa-e8bada98a6e2" name="mulesoft-curso-basico-1Sub_Flow"/> </flow> <sub-flow name="mulesoft-curso-basico-1Sub_Flow" doc:id="d211b398-57de-4884-afd6-6dbbd3d8a594" > <logger level="INFO" doc:name="mostrar mensaje" doc:id="fd2fa63e-c636-493a-9511-4a215f8001f1" message="Hola Mundo!" /> </sub-flow></mule>{Code mat;}
Learn MuleSoft: courses, exercises and quizzes. Free, no sign-up.
© 2026 Codebymat