1

How to convert below mule3 code to mule4:

#[validateCurrentQuarter ? false: (year == prevQuarterYear) &&  (month == prevQuarterMonth)]
3
  • what are validateCurrentQuarter, year, prevQuarterYear, month and prevQuarterMonth exactly? what types and values have? Commented Feb 14, 2022 at 13:14
  • hi @aled, all these are variables Commented Feb 14, 2022 at 14:24
  • usually variable is Mule 3 are prefixed with flowVars. And what are their data types? Commented Feb 14, 2022 at 14:46

1 Answer 1

0

In Mule 4 the expression language is DataWeave 2.0. The equivalent of the ternary operator is if/else. Variables must be prefixed with vars.. Assuming vars.validateCurrentQuarter is boolean:

#[if (vars.validateCurrentQuarter) false else (year == prevQuarterYear and month == prevQuarterMonth)]

You can find more information in the migration guide.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.