MuleSoft / Anypoint Code Builder
Anypoint Code Builder | MUnit Enable Flow Sources Entries Are Removed from the XML When Saving from the Properties Panel
Summary
In Anypoint Code Builder, when a flow is added under Enable flow sources of an MUnit test from the properties panel in the MUnit canvas and the file is saved, the munit:enable-flow-sources block is written to the XML as an empty element.
The existing enable-flow-source entries are removed and the newly added entry is not written, even though the properties panel shows all of them before saving. After the file is closed and reopened, the entries are also gone from the properties panel.
The issue occurs both when the project is opened as a single folder and when it is part of a multi-root workspace.
Workaround
Until a fix is available, add, change, or remove the munit:enable-flow-source entries directly in the XML code editor of the test suite instead of using the properties panel.
If you edit a test from the properties panel, review the saved XML (for example, with your source control diff) before committing, and restore the Enable flow sources entries if they were removed.
Steps to reproduce
- Open a Mule project with an MUnit test suite whose test contains an Enable flow sources block with one or more entries, for example:
<munit:enable-flow-sources>
<munit:enable-flow-source value="my-main-flow" />
</munit:enable-flow-sources> - Open the test suite in the MUnit canvas and select the test card.
- In the properties panel, under Enable flow sources, click + Add, select another flow, and save the file.
- Check the XML of the test suite.
Actual result: The block is saved as <munit:enable-flow-sources/>, without any entries.
Expected result: The block keeps the existing entries and contains the newly added one, matching the properties panel.
Error details
After saving from the properties panel, the test suite XML contains an empty element: Existing enable-flow-source entries are removed and new ones are not written. No error is shown in the UI.
History
Description updated
Nov 30, 2026
First tracked here as In Review with 1 report
Nov 30, 2026