diff --git a/AGENTS.md b/AGENTS.md
index 44b27eb..2a49339 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -21,6 +21,8 @@ A catalogue of runnable Mule 4 examples of design and integration patterns, one
HTTP endpoint paths are referenced by published articles; do not change them when moving files.
+EIP examples use the kit Mule naming rules; SOLID keeps the names its published articles quote.
+
## Technology declarations
- `app.runtime = 4.9.17` — [pom.xml](pom.xml).
diff --git a/README.md b/README.md
index 4f1bd89..a9eb1e5 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ curl -s 'localhost:8081/lsp/before/orders/ORD-1001?provider=new'
mvn clean test
```
-MUnit runs on the Mule Enterprise runtime, so Maven needs access to the MuleSoft Enterprise repository (credentials in `~/.m2/settings.xml`, as in any MuleSoft project). The build fails below 80% application coverage; the current suites cover 181 cases at about 98.8%.
+MUnit runs on the Mule Enterprise runtime, so Maven needs access to the MuleSoft Enterprise repository (credentials in `~/.m2/settings.xml`, as in any MuleSoft project). The build fails below 80% application coverage; the current suites cover 183 cases at about 99.5%.
## SOLID in MuleSoft
@@ -123,7 +123,7 @@ What the wave 2 suites show, observed on Mule 4.9.17 with MUnit 3.7.1 and Aggreg
What the wave 3 suites show, observed on Mule 4.9.17 with MUnit 3.7.1:
- The message translator turns two CSV rows into one order with numeric quantities (`2`, not `"2"`) and prices in units (`1250` cents become `12.5`); an unknown product code is rejected by name (`unknown product code: LAMP-99`).
-- The same order sent by the marketplace as JSON and by a partner as XML gives the same canonical items and the same invoicing lines, total and warehouse rows; only the ids and `source` differ (`cdm-partner-xml-gives-the-same-target-documents`). The target translators are called with a canonical order alone, without any source, and they take the `CanonicalOrder` type, so an order without a currency fails at the call (`cdm-module-target-translator-rejects-an-order-that-is-not-canonical`). An order without a currency, or with lines in two currencies, gets 400; no currency is assumed.
+- The same order sent by the marketplace as JSON and by a partner as XML gives the same canonical items and the same invoicing lines, total and warehouse rows; only the ids and `source` differ (`cdm-partner-xml-gives-the-same-target-documents`). The target translators are called with a canonical order alone, without any source, and they take the `CanonicalOrder` type, so an order without a currency fails at the call (`cdm-module-target-translator-rejects-an-order-that-is-not-canonical`). An order without a currency, or with lines in two currencies, gets 400; no currency is assumed. Over real HTTP both source listeners, and the message translator's, answer the status the error handler set: an invalid order is 400 in JSON, not 200 (`mt-over-http-error-answers-400-and-success-200`, `cdm-over-http-errors-answer-400-and-success-200`).
- What the simulated invoicing system received has exactly the seven allowed fields; the card number and the email do not appear anywhere in it, and neither does a `loyaltyCardNumber` added to the order (`cf-field-added-to-the-order-later-does-not-leak`).
- For a 200,000-byte document the archive receives a message with three fields (`orderId`, `claimKey`, `fileName`) and still archives 200,000 bytes, fetched with the key. The same key works again after the archive has used it, and 5 seconds after check-in it gets 404 (`cc-claim-expires-after-its-time-to-live`), so the claim check suite takes about 6 seconds. Over real HTTP, check-in answers 202 and check-out answers 200 with the document as `application/json` (`cc-check-out-does-not-remove-the-document`).
- In the content enricher, a spy before the merge sees the order as payload after the CRM call, and `vars.vCustomer` holds only the customer part of the answer (no `meta`), while the payload still has only the order's keys (`orderId`, `customerId`, `items`). When the CRM answers 503, a value that `vCustomer` held before the call is still there afterwards (`ce-crm-down-sets-no-target-variable-and-returns-503`), the merge does not run and the endpoint answers 503; `HTTP:CONNECTIVITY` and `HTTP:TIMEOUT` give the same 503 (`ce-crm-unreachable-returns-503`, `ce-crm-timeout-returns-503`).
@@ -141,7 +141,7 @@ What the wave 5 suites show, observed on Mule 4.9.17 with MUnit 3.7.1 (calls go
- Guaranteed delivery: the 202 comes back with the whole order already in the persistent outbox (read directly with `os:retrieve`) and not yet at fulfilment (404). With fulfilment down two passes leave it `STORED`, `attempts` 2, `lastError` `HTTP:SERVICE_UNAVAILABLE`; the pass after fulfilment is back delivers it (`attempts` 3, received once). When removing it from the outbox fails after delivery (mocked, as a crash at that point would), the next pass sends it again and fulfilment receives it twice and processes it once. Fulfilment answering 400 to order A moves A to the dead store (`DEAD`, `HTTP:BAD_REQUEST`) while order B is delivered in the same pass; with fulfilment down the fifth failed attempt moves the order to the dead store and a later pass does not send it. A second POST of a stored or delivered `orderId` gets 409. The Scheduler test polls the status (Until Successful) instead of sleeping. The order is in a store declared `persistent="true"`; surviving a restart is the connector's guarantee, not shown by MUnit.
- Transactional client: with the second write mocked to fail with `OS:STORE_NOT_AVAILABLE`, the Try with `ALWAYS_BEGIN` answers 500 and leaves the 50.00 debit with the order unpaid; the compensated version answers 503 and leaves neither record; with the undo also mocked to fail it answers 500 `compensation failed` and the debit stays. The 500 of the "before" Try shows the outcome, not an effect of `ALWAYS_BEGIN`: the Try holds no transactional resource. A second payment of a paid order gets 409 from both endpoints.
-- Message expiration: a request that expires in a minute is `QUEUED` until the consumer runs and then `RESERVED`; one sent already expired becomes `EXPIRED` with the reason and no reservation; one queued with `expiresAt` already past (the queue does not check it, only the consumer does, so no sleep is needed) is `EXPIRED` while one with a minute left in the same pass is `RESERVED`. A stored request whose `expiresAt` no longer parses becomes `FAILED` and the request after it is still `RESERVED` in the same run. A `quantity` of 0, -3, 1.5 or `"two"` gets 400. The Scheduler test polls (Until Successful) instead of sleeping.
+- Message expiration: a request that expires in a minute is `QUEUED` until the consumer runs and then `RESERVED`; one sent already expired becomes `EXPIRED` with the reason and no reservation; one queued with `expiresAt` already past (the queue does not check it, only the consumer does, so no sleep is needed) is `EXPIRED` while one with a minute left in the same pass is `RESERVED`. A stored request whose `expiresAt` no longer parses becomes `FAILED` and the request after it is still `RESERVED` in the same run. A `quantity` of 0, -3, 1.5 or `"two"` gets 400 and is not queued; a request without one is reserved with quantity 1. The Scheduler test polls (Until Successful) instead of sleeping.
- Invalid message channel: malformed JSON, a schema violation (all three listed in the reason), an XML body and a JSON array each get 400 and one entry in the invalid channel with the reason and the body as received; the 400 names the same invalid-message id, and the request is not stored. A valid request is 202 and leaves the channel empty, also when sent as `Application/JSON; charset=UTF-8`; a second valid request with the same `orderId` gets 409 and the first is kept.
Notes:
diff --git a/src/main/mule/eip/canonical-data-model/canonical-data-model.xml b/src/main/mule/eip/canonical-data-model/canonical-data-model.xml
index 79a3119..fb5d5cd 100644
--- a/src/main/mule/eip/canonical-data-model/canonical-data-model.xml
+++ b/src/main/mule/eip/canonical-data-model/canonical-data-model.xml
@@ -34,7 +34,9 @@
two target documents it produced.
-->
-
+
+
+
-
+
+
+
-
-
+
-
-
+
+
-
-
+
-
+{ requestId: vars.vPaymentRequest.requestId, amount: vars.vPaymentRequest.amount }]]>
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/main/mule/eip/correlation-identifier/mule-correlation-id.xml b/src/main/mule/eip/correlation-identifier/mule-correlation-id.xml
index 0b9ba90..004f38c 100644
--- a/src/main/mule/eip/correlation-identifier/mule-correlation-id.xml
+++ b/src/main/mule/eip/correlation-identifier/mule-correlation-id.xml
@@ -21,9 +21,11 @@
-->
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
-
+
diff --git a/src/main/mule/eip/idempotent-receiver/idempotent-receiver-after.xml b/src/main/mule/eip/idempotent-receiver/idempotent-receiver-after.xml
index d17a67c..2fabe9c 100644
--- a/src/main/mule/eip/idempotent-receiver/idempotent-receiver-after.xml
+++ b/src/main/mule/eip/idempotent-receiver/idempotent-receiver-after.xml
@@ -32,36 +32,36 @@
After a successful charge the order is sent to the payment provider: see correlation-identifier.xml.
-->
-
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
+
+{ orderId: payload.orderId, result: vars.vChargeResult }]]>
-
+
diff --git a/src/main/mule/eip/idempotent-receiver/idempotent-receiver-before.xml b/src/main/mule/eip/idempotent-receiver/idempotent-receiver-before.xml
index 6a3919e..a56da9e 100644
--- a/src/main/mule/eip/idempotent-receiver/idempotent-receiver-before.xml
+++ b/src/main/mule/eip/idempotent-receiver/idempotent-receiver-before.xml
@@ -19,32 +19,32 @@
- Different orders sent by one flow in a loop (one correlation ID, propagated in X-CORRELATION-ID)
are rejected as duplicates.
-->
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
+
+{ orderId: payload.orderId, result: vars.vChargeResult }]]>
-
+
diff --git a/src/main/mule/eip/idempotent-receiver/payment-common.xml b/src/main/mule/eip/idempotent-receiver/payment-common.xml
index 3450f95..344607a 100644
--- a/src/main/mule/eip/idempotent-receiver/payment-common.xml
+++ b/src/main/mule/eip/idempotent-receiver/payment-common.xml
@@ -13,49 +13,49 @@
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
+
+
+
+
@@ -63,17 +63,19 @@ var orderKeys = payload filter ($ startsWith (vars.ledgerOrderId ++ "|"))
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
+
@@ -84,37 +86,37 @@ var orderKeys = payload filter ($ startsWith (vars.ledgerOrderId ++ "|"))
leaves this flow with the SAME correlation ID (the batch request's), sent in X-CORRELATION-ID, which
is exactly what fools the default idempotent validator of the "before" endpoint.
-->
-
+
-
-
-
-
+
+
+
+
-
+
-
-
-
-
+
+
+
+
-
+
-
+
+{ version: vars.vVersion, results: vars.vResults }]]>
diff --git a/src/main/mule/eip/message-filter/stock-reservation-common.xml b/src/main/mule/eip/message-filter/stock-reservation-common.xml
index 9d8355c..7b1031b 100644
--- a/src/main/mule/eip/message-filter/stock-reservation-common.xml
+++ b/src/main/mule/eip/message-filter/stock-reservation-common.xml
@@ -47,7 +47,9 @@
-
+
+
+
diff --git a/src/main/mule/eip/message-translator/message-translator.xml b/src/main/mule/eip/message-translator/message-translator.xml
index d270790..ae824ee 100644
--- a/src/main/mule/eip/message-translator/message-translator.xml
+++ b/src/main/mule/eip/message-translator/message-translator.xml
@@ -35,7 +35,9 @@
whose keys are the header's column names: https://docs.mulesoft.com/dataweave/latest/dataweave-formats-csv
-->
-
+
+
+
diff --git a/src/main/mule/eip/recipient-list/recipient-list-recipients.xml b/src/main/mule/eip/recipient-list/recipient-list-recipients.xml
index 78b61d5..b7b9b10 100644
--- a/src/main/mule/eip/recipient-list/recipient-list-recipients.xml
+++ b/src/main/mule/eip/recipient-list/recipient-list-recipients.xml
@@ -50,7 +50,9 @@
-
+
+
+
diff --git a/src/main/mule/eip/scatter-gather/scatter-gather-services.xml b/src/main/mule/eip/scatter-gather/scatter-gather-services.xml
index 78c5865..bfc00f8 100644
--- a/src/main/mule/eip/scatter-gather/scatter-gather-services.xml
+++ b/src/main/mule/eip/scatter-gather/scatter-gather-services.xml
@@ -17,7 +17,9 @@
CUS-NEW score 80 (HIGH_RISK)
-->
-
+
+
+
-
+
+
+
-
+
+
+
+ http://www.mulesoft.org/schema/mule/munit-tools http://www.mulesoft.org/schema/mule/munit-tools/current/mule-munit-tools.xsd
+ http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
-
+
-
+
@@ -104,11 +104,11 @@
-
-
+
+
-
-
+
+
@@ -140,10 +140,10 @@
-
+
-
+
@@ -151,8 +151,8 @@
-
-
+
+
@@ -160,7 +160,8 @@
-
+
+
@@ -174,10 +175,10 @@
-
+
-
+
@@ -185,15 +186,16 @@
-
-
+
+
-
+
+
@@ -206,10 +208,10 @@
-
+
-
+
@@ -217,8 +219,8 @@
-
-
+
+
@@ -226,7 +228,8 @@
-
+
+
@@ -239,10 +242,10 @@
-
+
-
+
@@ -250,13 +253,13 @@
-
-
+
+
-
+
@@ -268,7 +271,8 @@
-
+
+
@@ -277,12 +281,12 @@
-
+
-
+
@@ -292,16 +296,16 @@
-
+
-
+
-
+
@@ -312,8 +316,8 @@
-
-
+
+
@@ -324,12 +328,12 @@
-
+
-
+
diff --git a/src/test/munit/eip/idempotent-receiver-test-suite.xml b/src/test/munit/eip/idempotent-receiver-test-suite.xml
index c0b1609..c8915ce 100644
--- a/src/test/munit/eip/idempotent-receiver-test-suite.xml
+++ b/src/test/munit/eip/idempotent-receiver-test-suite.xml
@@ -39,8 +39,8 @@
-
-
+
+
@@ -68,8 +68,8 @@
-
-
+
+
@@ -88,10 +88,10 @@
-
+
-
+
@@ -108,8 +108,8 @@
-
-
+
+
@@ -144,10 +144,10 @@
-
+
-
+
@@ -174,7 +174,7 @@
-
+
@@ -193,8 +193,8 @@
-
-
+
+
@@ -249,10 +249,10 @@
-
+
-
+
diff --git a/src/test/munit/eip/message-expiration-test-suite.xml b/src/test/munit/eip/message-expiration-test-suite.xml
index 4914034..c1d8c81 100644
--- a/src/test/munit/eip/message-expiration-test-suite.xml
+++ b/src/test/munit/eip/message-expiration-test-suite.xml
@@ -186,90 +186,101 @@
-
+
+
-
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
-
+
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/test/munit/eip/message-translator-test-suite.xml b/src/test/munit/eip/message-translator-test-suite.xml
index 47ca2d4..3dc2e6f 100644
--- a/src/test/munit/eip/message-translator-test-suite.xml
+++ b/src/test/munit/eip/message-translator-test-suite.xml
@@ -2,11 +2,13 @@
+ http://www.mulesoft.org/schema/mule/munit-tools http://www.mulesoft.org/schema/mule/munit-tools/current/mule-munit-tools.xsd
+ http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">