如何在Dataweave中使用相等的Ignore Cases

时间:2015-11-19 06:51:29

标签: mule mule-studio mule-component mule-el dataweave

我想在dataweave中检查相等的Ignore案例

%dw 1.0
%output application/xml
--- 
    Order:
    {
        Channel:payload.Order.@EnterpriseCode,
        Code:payload.Order.@OrderNo,

        (Status:payload.Order.@Status) when (payload.Order.@Status== "complete") ,

        OrderLines:{
            ((payload.Order.OrderLines.*OrderLine default []) map {
            OrderLine:{
                EntryNumber:$.@PrimeLineNo,
                Status:$.@Status,
                Quantity:$.@OrderedQty
            }
        })
    }

    }

我想在检查条件时忽略案例。如何在Mule dataweave中实现它

1 个答案:

答案 0 :(得分:4)

您可以使用upper函数,如下所示:

{
 (Field1: payload.Field1) when (upper payload.Field1) == "COMPLETE"
}