How to calculate minimum in mule

HMT :

I want to calculate the minimum of vars.a , vars.b , vars.d-vars.c

min[vars.a,vars.b,vars.d-vars.c] is not working 

Math.min(Math.min(vars.a,vars.b),vars.d - vars.c) is also not working

I m trying to add this logic in a transform and I am using mule version 4.0

what is the best way to compute this is in mule ?

Christian Chibana :

In DataWeave you can calculate it as

min([vars.a,vars.b,vars.d - vars.c])

The parenthesis is missing in your code

https://docs.mulesoft.com/mule-runtime/4.2/dw-core-functions-min

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=390792&siteId=1