You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, @asilodia. Thanks for bringing this to our attention! The code you shared will help us reproduce the issue and work on a fix if needed. We'll update you once we analyze the issue further. Cheers!
For certain Dataweave transforms, minor formatting changes happen, like removal of parentheses, which cause runtime issues.
e.g. In Mule 3.9.x, we had this Dataweave:
%dw 1.0
%output application/java
{$.name == payload01.CUST_ATTR.FIELDNAME and $ .value == payload01.CUST_ATTR.VMS_FIELD_VALUE and payload01.PS_CUSTOMER_ID == flowVars.psCustomerPayload.psCustomer[0].customerID) map ((payload02, indexOfPayload02) -> {
Customer: {
PS_Customer_ID: flowVars.psCustomerPayload.psCustomer[0].customerID,
CUST_ATTR: flowVars.psCustomerAttribPayload.Customer map ((payload01 , indexOfPayload01) -> {
(flowVars.psGrpCustomerAttribPayload filter (
SETID: payload01.CUST_ATTR.SETID,
FIELDNAME: payload01.CUST_ATTR.FIELDNAME,
VMS_FIELD_VALUE: payload01.CUST_ATTR.VMS_FIELD_VALUE,
PS_FIELD_VALUE: payload01.CUST_ATTR.PS_FIELD_VALUE,
TRANSLATE_FLG: payload01.CUST_ATTR.TRANSLATE_FLG,
VALIDATE_FLG: payload01.CUST_ATTR.VALIDATE_FLG
}))
}) filter ($ != {
})
}
}
After running MMA, we got this dataweave in Mule 4.3.x
%dw 2.0
output application/java
{$.name == payload01."CUST_ATTR".FIELDNAME and $ .value == payload01."CUST_ATTR"."VMS_FIELD_VALUE" and payload01."PS_CUSTOMER_ID" == vars.psCustomerPayload.psCustomer[0].customerID) map (payload02, indexOfPayload02) -> {
Customer: {
"PS_Customer_ID": vars.psCustomerPayload.psCustomer[0].customerID,
"CUST_ATTR": vars.psCustomerAttribPayload.Customer map (payload01, indexOfPayload01) -> {
(vars.psGrpCustomerAttribPayload filter (
SETID: payload01."CUST_ATTR".SETID,
FIELDNAME: payload01."CUST_ATTR".FIELDNAME,
"VMS_FIELD_VALUE": payload01."CUST_ATTR"."VMS_FIELD_VALUE",
"PS_FIELD_VALUE": payload01."CUST_ATTR"."PS_FIELD_VALUE",
"TRANSLATE_FLG": payload01."CUST_ATTR"."TRANSLATE_FLG",
"VALIDATE_FLG": payload01."CUST_ATTR"."VALIDATE_FLG"
})
}filter (not $ == {})
}
}
The parentheses around the CUST_ATTR map statement are removed after migration, which causes runtime errors.
The text was updated successfully, but these errors were encountered: