> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/languages/mulesoft.md).

# MuleSoft

MuleSoft analysis is available starting in SonarQube Server Enterprise Edition. This page is for SonarQube Server 2026.5.

MuleSoft analysis is available starting in [Enterprise edition](https://www.sonarsource.com/plans-and-pricing/enterprise/).

The MuleSoft analyzer analyzes Mule 4 applications. It examines Mule XML configuration files and DataWeave source code to provide code-quality and security insights.

## Project detection

The analyzer identifies a Mule 4 application from its `mule-artifact.json` file.

For a standalone project, the file must be at the repository root:

```
repository/
└── mule-artifact.json
```

For a monorepo, the analyzer also searches the direct children of the repository root:

```
repository/
├── application-a/
│   └── mule-artifact.json
└── application-b/
    └── mule-artifact.json
```

If the artifact file is deeper in the repository structure, specify its path explicitly with the `sonar.dre.mulesoft.muleArtifactPath` property. For example:

```properties
sonar.dre.mulesoft.muleArtifactPath=path/to/mule-artifact.json
```

## Embedded DataWeave in Mule XML

The analyzer examines embedded DataWeave code in the following Mule XML locations:

* `<set-variable>` `value` attributes containing an expression (`#[...]`), for example:

```xml
<set-variable value="#[payload]" />
```

* `<ee:set-variable>` CDATA bodies, for example:

```xml
<ee:set-variable><![CDATA[%dw 2.0
---
payload]]></ee:set-variable>
```

* `<set-payload>` `value` attributes containing an expression (`#[...]`), for example:

```xml
<set-payload value="#[payload]" />
```

* `<ee:set-payload>` CDATA bodies, for example:

```xml
<ee:set-payload><![CDATA[%dw 2.0
---
payload]]></ee:set-payload>
```

> **Note:** Embedded DataWeave code in other Mule XML locations is not currently analyzed.

## Mule configuration measures

For Mule XML configuration files, the analyzer computes these custom measures:

* **Mule configuration file count**: number of Mule XML configuration files analyzed.
* **Mule DataWeave transformation count** (`<ee:transform>`): number of DataWeave transformations in the analyzed Mule XML configuration files.
* **Mule flow count** (`<flow>`): number of Mule flows in the analyzed Mule XML configuration files.
* **Mule sub-flow count** (`<sub-flow>`): number of Mule sub-flows in the analyzed Mule XML configuration files.
* **Mule configuration complexity rating**: computed by adding the number of flows and sub-flows together, then mapping the result as follows:
  * A (simple): total <= 7
  * B (medium): 7 < total <= 15
  * C (complex): total > 15

## Language-specific properties

Discover and update the MuleSoft-specific [Analysis parameters](/sonarqube-server/analyzing-source-code/analysis-parameters.md) by going to **Administration** > **Configuration** > **General Settings** > **Languages** > **MuleSoft**.

## Test coverage parameters

See [Test coverage parameters](/sonarqube-server/analyzing-source-code/test-coverage/test-coverage-parameters.md#mulesoft).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/languages/mulesoft.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
