Question

I am looking to create a custom-tag or extend an existing tag in Mule.

Like I want to extend the First-successful routing processor. I am planning to add some features to the existing behaviour of the processor.

Please help me how can I do this.

Was it helpful?

Solution

This is not a simple job. In order to define new tags, you'd have to create a new schema definition (XSD) to state the new elements and attributes. Among many other things, you'd have to create classes supporting the new features (possibly extending many of the mule's own classes). One of the trickiest parts would be to define the new elements with substitutionGroups pointing to pre-defined mule elements. You'd also have to create Schema Definition Parsers in order to translate from the new XML tags to these new support-classes.

After the new XML/Functionality library is assembled, its XSD would have to be added to your mule configuration file with some prefix, as you normally do in the <mule> tag via xmlns:someprefix and xsi:schemaLocation attributes to respectively identify/prefix and locate your new schema library.

This is an amazing and important task-set to be undergone if you're planning to have/share/sell a complete solution. Indeed, these steps ensure a really strong usability. If this is the case, the considerable effort to execute them may be justified.

OTHER TIPS

You won't be able to modify the first-successul, however you can implement your own custom processor: http://www.mulesoft.org/documentation/display/current/Routing+Message+Processors#RoutingMessageProcessors-CustomProcessor

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top