TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Custom processor
1. Custom Processor
We can describe a Mule Application as a
Mule message, triggered by any event,
that passes through different processors
(steps).
2. Customer Processor
• We can create new class that behave as custom
processor
• Our new class
must implement org.mule.api.processor.MessagePro
cessor. This class has the operation process that
receives the MuleEvent similar to our first approach.
• In the example below we are going to receive this
event, set a different payload and return the event
with our new payload.
3. Custom Processor Class
• We override the process method and access
the payload using event Object
• We can get the payload using getMessage
and update as per business logic
4. Custom Processor Flow
• We can use custom-processor
element to call the custom
processor class
• We convert then Object to String