Contact Us 1-800-596-4880

Mule Studio Essentials

Mule Studio is an Eclipse-based, integration development environment. It offers two development environments you can use to create Mule applications:

  1. A visual, drag-and-drop Editor.

  2. An XML Editor

Whatever you develop or configure in one editor is reflected in the other. Same tool, different editor.

What is the relationship between Mule ESB and Mule Studio?

Mule ESB is the core Enterprise Service Bus application. You can install and use Mule ESB without Mule Studio (a.k.a Mule ESB Standalone, or Mule ESB Runtime) and interact with it - building and running integration applications and Web services - via an independent external integration development environment (IDE), like IntelliJ, Eclipse or JDeveloper.

Mule Studio is the graphical user interface you can use to access Mule ESB’s functionality. Rather than writing XML code in an IDE to create Mule applications, you can use Studio, Everyman’s visual integration development environment. Use Studio (a.k.a. Mule ESB Designtime) to drag and drop elements into place to quickly model, configure, then deploy applications on-premises or in the cloud.

A. Model

The visual editor enables a developer to arrange building blocks on a composition canvas to create Mule flows, which form the basis of Mule applications. Simply drag-and-drop building blocks on the canvas to create a sequence of events that facilitate the process of Mule messages.

B. Configure

The visual editor provides dialog boxes to configure building blocks. The dialogs accept plain English entries, rather than formatted XML, so developers don’t have to bother with XML syntax when configuring each building block.

Developers already comfortable with XML may prefer to use XML editor to set configuration details by writing XML statements directly into the XML configuration file. Studio makes XML coding easier by providing syntax guidance (suggestions for auto-completion) and providing drop-down menus that list the available options for XML attributes.

C. Debug

Studio includes a debugger to run a Mule application and watch the source code and examine the variables during execution. Set break points in an application, then let Mule get to work.

D. Deploy

Deploy a new Studio application locally to test it, or externally to put it to work in a production environment. A developer can also deploy a Studio application to the application repository in the Mule Management Console or deploy to CloudHub.

How To Use The Visual Editor

Studio’s visual editor is divided into four quadrants:

  1. Package Explorer

  2. Canvas

  3. Outline

  4. Console

The Package Explorer displays project folders and files in a tree format. Click to expand or contract Mule project folders and examine the files that make up a Mule project.

The Canvas provides a space that facilitates the arrangement of Studio components into Mule flows. the Palette, on the right-hand edge of the canvas, displays a list of Mule building blocks that oyu can click and drag onto the canvas to build your application. At the base of the canvas, Studio offers three tabs which offer different ways to interface with your application.

  • Message Flow: the drag-and-drop interface that facilitates arrangement of Studio components into Mule flows.

  • Global Elements: the interface for creating or editing reusable configurations for Mule building blocks.

  • Configuration XML: the XML editor interface displays the XML statements that corresponds to the building blocks arranged on the Message flow canvas.

The Outline displays a miniaturized overview of the whole canvas, along with a box cursor that scrolls through the display in the canvas pane. This provides a high-level bird’s eye view of your complete Mule applications as it extends beyond the borders of the canvas.

The Console displays a list of events and problems (if any) that Studio reports as you create or run your Mule application. The JavaDoc and Decelarations tab displays additional categories of information related to you code.

Use Mule Studio to arrange bulding blocks on the canvas to create flows which, together, form an application to process messages.

Confused? Lets' break it down:

Building Blocks

A building block is a pre-packaged unit of business logic that comes bundled with Mule. As the name implies, it is a block (a block of code, really) that you can arrange with other blocks to form a structure. In this case, you are arranging building blocks to form a Mule flow.

Building blocks fall into one of three categories depending on their function within a Mule flow:

Type Function Examples

Message Processor

Filter, Alter, Route, or Validate Messages

Payload Filter, Choice Flow Control, Email to String Transformer

Message Source

Also known as Inbound Endpoints accept messages into flows and trigger message processing (Technically, message source, which receives messages, rather than processes them, do not qualify as message processors).

HTTP Endpoint, Ajax Endpoint

Component

Pre-packaged or customer-coded, integrate specific functionality (The custom code can be developed as a Java class, a Spring bean, or as a Ruby, JavaScript, Groovy, or Python script).

Logger, Echo, Java

To arrange building blocks to form a flow, simply drag and drop them frm the palette onto the canvas.

After you have arranged building blocks into a flow, you must configure each building block individually. Double-click the building block to open its Properties pane, then supply the value for the configuration fields. Studio saves all of you configurations in the XML file for your application. To see the XML version of your flow, click the Configuration XML tab below the canvas.

Flows

A flow resides at the heart of every Mule application, orchestrating message processing and, at times, triggering other flows. Typically, a message source receives a message, which triggers the main message processing flow. Each building block in the flow evaluates or processes the message until the message has passed through all the building blocks in the flow.

For more information on the types of flow and variations in behavior, see Mule Application Architecture.

Applications

Applications are collections of flows that work together to process a message. Simple applications consist of a single flow of message processors, but complex applications can contain several flows. Within the context of Mule Studio, the terms “application” and “project” are used interchangeably.

Messages

Messages are the functional data units, or packets, that Mule applications process. For example, each customer order submitted to a Mule purchase fulfillment application qualifies as a message. Each message contains a header and a payload, the latter of which may contain XML, JSON, files, streams, maps, Java objects, or any other type of data.

XML Editor Tips and Tricks

Because Mule Studio leverages the Eclipse IDE, the Configuration XML editor incorporates many Eclipse features provided. The following is a list of handy tips and tricks for using Mule Studio’s XML editor.

Show Attribute Options

  1. Double click to select an attribute of an element, such as the host attribute of the HTTP endpoint element.

  2. Press Ctrl+space bar to open a list of suggested attributes you can configure for the element (see below).

  3. Use the up and down scroll arrows to browse through the suggestions.

  4. When you have highlighted the attribute you wish to use, press enter to insert it into the XML configuration

Suggest Elements

  1. Enter an element’s left bracket (<), then press Ctrl+space bar.

  2. Recognizing that you are entering a new element, Studio list all possible elements for that particular situation.

  3. Use the up and down scroll arrows to browse through the suggestions.

  4. When you have highlighted the element you wish to use, press enter to inset it into the XML configuration.