8
MULE GROOVY COMPONENT BY – ANKUSH SHARMA

Mule Groovy component

Embed Size (px)

Citation preview

Page 1: Mule Groovy component

MULE GROOVY COMPONENTBY – ANKUSH SHARMA

Page 2: Mule Groovy component

WHAT IS GROOVY?

Apache Groovy is an object-oriented programming language for the Java platform. It is a dynamic language with features similar to those of Python, Ruby, Perl, and Smalltalk.

Page 3: Mule Groovy component

MULE GROOVY COMPONENT

In spite of the rich selection of elements available in Mule, you may find yourself in need to put together some custom code to carry out part of a complex task, if you’re comfortable coding in Groovy, then the Groovy Component is the ideal versatile tool to fall back on for these cases. Mule also includes also equivalent scripting components for other languages. The Groovy Component is also handy for when you’re modernizing legacy systems, as you can simply throw the old lines of code into a component instead of having to reengineer the code’s behavior through a series of different Mule components (this is not ideal from a debugging and maintenance perspective, though).

Page 4: Mule Groovy component

MULE GROOVY COMPONENT – CONFIGURATION WIZARD (GENERAL TAB) (CONT.)

Page 5: Mule Groovy component

MULE GROOVY COMPONENT – CONFIGURATION WIZARD (GENERAL TAB)• Following are components in General tab –

• Display Name – Display name of the Mule Groovy component.• Return Class – The reference of the return class for message content.• Encoding – Encoding standard to be applied on message content.• MIME Type – MIME type of the message content e.g. application/xml.• Script Text – Use this radio button to enter script text directly• Script File – Use this radio button to use script from a file.• Script Reference – Use this radio button to give reference to script location.

Page 6: Mule Groovy component

MULE GROOVY COMPONENT – CONFIGURATION WIZARD (ADVANCED TAB)

• Mule Groovy Component’s advanced tab is used to add properties for the component configuration.

Page 7: Mule Groovy component

MULE GROOVY COMPONENT – CONFIGURATION WIZARD (NOTES AND META-DATA TABS)• Notes tab - This tab is used to add special notes for the Groovy

component.• Metadata tab – This tab is used to add any metadata entry for Groovy

component.

Page 8: Mule Groovy component

THANK YOU!