Studio Components
Components Overview
The Studio building blocks known as Components fall into three categories: General, Script, and Web Service.
General components execute whenever a message is received. The logic embedded into General components cannot be modified. Components such as Logging, Flow Reference, and Echo fall into this category.
Script components do not contain pre-packaged logic; instead they allow the developer to specify the logic (in the form of a custom script or a Java class) to add into the component. Script components also allow you to:
-
configure interceptors
-
add Spring beans
-
change the value or reference of a specific property within the associated class
The Java Component allows you to reference a Java class. The other Script components support the Groovy, JavaScript, Python and Ruby scripting engines.
Web Service components, as the name implies, enable Mule to use SOAP and RESTful protocols to communicate with external Web services. The SOAP and RESTful components use CXF and Jersey services to convert messages from Java to XML. Web Service components also allow the developer to select or define the logic to be invoked by component. If using the RESTful component you only need to select a Java class and add a script to the component. On the other hand, SOAP configuration requires you to define attributes and select the operation method used to publish a SOAP web service. As an example of how the SOAP component can be used, a SOAP message could be sent to a web-service-enabled web site such as a used car price database, with the parameters needed for a search. The site would then return an XML-formatted document with the resulting data, e.g., prices, model and features. The data returned is then integrated directly into a third-party web site or application.
Configuring Components
To configure a component, double-click on the component to open the Pattern Properties dialog window. Every component in the Studio palette includes two common fields: Display name and Documentation, both of which are optional and should be familiar to Studio users, because they are common to virtually all Studio building blocks.
Beyond the two common fields, most Components do not require extensive configuration. For example, Echo does not support any fields other than Display name and Documentation. The five script components available within Studio support almost identical property pane fields.
For details, see the individual component reference pages on how to use and configure each type of component.
Components Available in Mule Studio
The following three tables each detail one of the Studio Component sub-groups:
General Components
General components allow you to enhance a flow by attaching functionality such as logging or displaying output.
Components | Description | Documentation | |
---|---|---|---|
Echo |
Outputs the message being processed to a log or display, then passes the message to the next building block in the flow. |
|
|
Flow Reference |
This building block calls another external flow. The called flow can be one of two types: |
Script Components
Script components facilitate Software as a Service (SaaS) integration by providing language-specific "shells" to make custom-coded business logic available in a Mule application. You can write the business logic in Java, Ruby, JavaScript, Groovy, or Python.
Components | Description | Documentation | |
---|---|---|---|
Groovy |
Facilitates the integration of a custom script backed by the Groovy script engine. |
|
|
Java |
Allows you to select a Java class to be invoked by the application flow. |
Coming Soon! |
Python |
Allows integration of a custom script backed by the Python script engine. |
|
Script |
Makes a script written in Groovy, JavaScript, Python, or Ruby available to the application flow. |
Web Service Components
Web Service components provide the developer with the framework to reference classes and API’s needed by RESTful and SOAP services. These components let you add interceptors, bundled logic which executes before the service is published, that run tasks such as scheduling or logging a specific event.
Components | Description | Documentation | |
---|---|---|---|
REST |
Makes a REST web service available to the application flow via Jersey. |
|