About Designing a Mule App (Design Center)

In Design Center, you create projects having one or more flows. A flow typically consists of one trigger and one or more utilities and connectors. Each part of a flow receives an input, carries out a specific function, and then transfers the output to the next part of the flow. The placement of connectors and utilities in a flow affects functionality. Information moves through a flow from left to right.

typical flow

After deployment and startup, a worker space is created, but not always instantaneously. When the worker space is ready, a green bar in parts of the flow indicate data flow is working fine. A red bar indicates a problem. As data moves through a flow, the following information appears on each part of the flow.

  • Elements that can make up the Mule Event: payload, attributes, and vars (variables).

  • The state of the elements: created (+), deleted (-), edited (triangle) or unchanged.

You can use these indicators to debug apps by sending mock requests to start the apps in the case of an HTTP-triggered app at interim stages of the design. In the case of a scheduler-triggered app, you can force a redeployment of the app by clicking Deploy, or wait until elapsed time triggers the app. An indispensible indicator for debugging is the log data that you can view by expanding Log at the bottom of the canvas.

A flow performs actions specified by its components when triggered. For example:

  • An HTTP listener at the beginning of a flow detects the outside event, an incoming HTTP request, which starts the flow.

  • A Scheduler at the beginning of a flow starts the flow at a configured time or restarts the flow after an elapsed time.

  • A Flow Ref in one flow starts another flow by referencing its name.

    A flow needs a trigger unless started by a Flow Ref in another flow. After choosing and configuring a trigger for a flow, you select the next thing to add to the flow from a list of utilities and connectors. You can filter the list to show only components or only utilities:

select a component

After you choose a utility or connector, if it requires configuration click to open and set properties. Configurations are independent of operations, so you can reuse the configurations. For example, you can use the same database configuration, but different SQL operations, in multiple database connector instances. Multiple HTTP connectors can use the same host, port, and SSL certificates, but request data from different URLs: /order/bread, /order/milk, /order/tea. The host, port and TLS information is defined in one HTTP configuration and the subpaths in the HTTP operation.

Some utilities, such as Try and For Each, do not perform any actions on their own, but affect the behavior of connectors you put inside of them. To add a connector to a utility, click Plus:

arrange cards flow design center e256e

You can nest utilities inside others. You drag a utility or connector to change its position in the flow.

In this topic: