Contact Us 1-800-596-4880

Components

Mule Runtime Engine versions 3.5, 3.6, and 3.7 reached End of Life on or before January 25, 2020. For more information, contact your Customer Success Manager to determine how you can migrate to the latest Mule version.

The 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 CXF component can be used, a SOAP message could be sent to a Web-service-enabled website 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 website or application.

Configuring Components

To configure a component, double-click on the component to open the Properties Editor in the console. Every component in the Studio palette includes two common fields: Display name and Notes, 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. 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 Anypoint 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-24x16

Echo

Simply passes the message to the next building block in the flow without performing any actions.

Echo Component Reference

flow reference 24x16

Flow Reference

This building block calls another external flow. The called flow can be one of two types:
A subflow, which inherits the processing strategy and exception handling properties of the calling flow.

A child flow, which sets its own processing strategy and exception handling properties.

If the called flow is Synchronous, the calling flow waits until the called flow completes execution, then resumes. If the called flow is Asynchronous, the calling flow resumes execution immediately.

Flow Reference Component Reference

Logger-24x16

Logger

Logs custom strings, including strings constructed from embedded expressions. Also allows specification of logging level and category.

Logger Component Reference

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 component 24x16

Groovy

Facilitates the integration of a custom script backed by the Groovy script engine.

Groovy Component Reference

java component 24x16

Java

Allows you to select a Java class to be invoked by the application flow.

Java Component

javascript component 24x16

JavaScript

Allows integration of a custom script backed by the JavaScript engine.

JavaScript Component Reference

python component 24x16

Python

Allows integration of a custom script backed by the Python script engine.

Python Component Reference

ruby component 24x16

Ruby

Allows integration of a custom script backed by the Ruby script engine.

Ruby Component Reference

Component-24x16

Script

Makes a script written in Groovy, JavaScript, Python, or Ruby available to the application flow.

Script Component Reference

Web Service Components

Web Service components provide the developer with the framework to reference classes and API’s needed by RESTful and SOAP Web 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-24x16

REST

Makes a REST web service available to the application flow via Jersey.

REST Component Reference

Soap-24x16

CXF

Makes a web service available to the application flow via CXF.

CXF Component Reference