This page last changed on Oct 26, 2005 by rossmason.

The Mule configuration Grapher is a great tools for generating Configuration graphs from Mule Xml. Take a look at some samples -

Mule Configuration Graphs
(view as slideshow)
       
  Voip Service Config   Loan Broker Sync Config   Loan Broker ESB Config
 
       
  Echo Mule Config   Hello Http Config   Error Handler Config
 

Running the tool

Prerequisites

To run you will need the following -

Optional

  • If you are asked to execute any Maven commands you'll need the Maven build tool from Apache. Mule has been tested with Maven 1.0.2. (Download Maven 1.0.2)

Running

The Config Graph tools is located in the Mule distibution under tools/config-graph.

You can generate configuration graphs for all Mule Sample applications
by running the following command in this directory -

maven generate-samples

To generate graphs for your own configuration files you can run

maven -Dfiles=my-mule-config.xml generate

Options

Option Description Default Required
files A comma-seperated list of Mule configuration files   Yes
mappings The path to a mappings file (see below)   No
outputdir The directory to write the generated graphs to ./ No
exec The executable file used for Graph generation ./win32/dot.exe No
caption Default caption for the generated graphs 'id' attribute in the config file No
combinefiles Whether to include all files in a single diagram false No
outputfile The name of the file to output Input filename + '.gif' No
? Displays usage help   No

Combining Files

Combining files can be really useful fo getting the 'big picture' of your Mule Application as you can combine Mule node configurations from many different machines.

Mappings

Mappings are used to make a logical connection between objects on the graph when there is no relationship configured in the Mule Xml. These logical Mappings are only required when the routing path between components is not explicitly defined i.e. dynamic routing.

Mappings are defined as key/value pairs in a .properties file where the key 'maps' to the value in the diagram. These values use the object names as represented on the output graph so you can define relationships between component, endpoints, routers or any other object.

An example mapping might be where a replyTo endpoint is set on a message and Mule handles the routing from the replyTo to the next component. Using the Loan Broker as an example, the replyTo endpoints for the Banks would be mapped as -

Bank1=LoanBrokerQuotes
Bank2=LoanBrokerQuotes
Bank3=LoanBrokerQuotes
Bank4=LoanBrokerQuotes
Bank5=LoanBrokerQuotes

When using dynamic routers such as the receipient List you may want to define the possible routes from the router to the endpoints i.e.

LenderService.org.mule.routing.outbound.StaticRecipientList=Bank1,Bank2,Bank3,Bank4,Bank5

This says, from the StaticRecipientList router on the LenderService, map to each of the Bank endpoints.

Mapping Duplicate Endpoints

Sometimes and inbound endpoint is not expressed in the same way as an outbound endpoint. This is the case for Soap endpoints where the outbound endpoint has a method param, but inbound endpoint Soap endpoint doesn't. You can logically map these two endpoints so that they appear as one on the graph, i.e.

CreditAgencyReceiver.equals=CreditAgency

Note the 'equals' extension tells the Config Graph that the two objects are equivilent.

Once you map the two endpoints you'll probably want to hide one of them...

Hiding Nodes

To hide a node you add the following entry to the mapping file

CreditAgencyReceiver.hide=true

Tips

It's a good practice to use Endpoint Identifiers in your Mule Xml to map physical endpoints to logical names. This helps when configuring mappings for the Config Grapher and these logical names can be used in the mappings instead of the physical names.


Document generated by Confluence on Oct 03, 2006 09:23