The Ruby component allows developers to:
- Configure interceptors to alter message properties or references during processing
- Execute tasks like scheduling or logging via custom interceptors
- Define script properties and references through the Advanced tab to influence message flow
2. What is Ruby?
Ruby is a dynamic, reflective, object-oriented, general-purpose programming
language. It was designed and developed in the mid-1990s by Yukihiro "Matz"
Matsumoto in Japan. According to its creator, Ruby was influenced by Perl,
Smalltalk, Eiffel, Ada, and Lisp.
3. Mule Ruby Component
Ruby allows the developer to configure interceptors and alter the values or
references of particular properties in a script. Interceptors are configured to
provide additional services to a message as it flows through a component. For
example, a developer can configure an interceptor to execute scheduling or
logging of a particular event while a message is being processed. The Ruby
component also includes a custom interceptor which allows you to configure
settings for Spring elements. Use the Advanced tab to access Script Properties,
then define the value and reference for a particular property in the script. When
using Ruby, typing-in or appending a script to the component is the only
configuration required.
5. MULE Ruby Component – Configuration
Wizard (General tab)
Following are components in General tab –
Display Name – Display name of the Mule Ruby component.
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.
7. MULE Ruby Component – Configuration
Wizard (Advanced tab
Following are the options on advanced tab –
Interceptors – Various interceptors can be defined according to various events.
Interceptor Stack – Name of the interceptor stack to be used.
Script properties – Various script properties can be added here.
8. MULE Ruby Component – Configuration
Wizard (Notes and meta-data tabs)
Notes tab - This tab is used to add special notes for the Ruby component.
Metadata tab – This tab is used to add any metadata entry for Ruby
component.