2015-11-19 44 views
1

等於忽略情況下,我想檢查等於忽略案件dataweave如何使用Dataweave

%dw 1.0 
%output application/xml 
--- 
    Order: 
    { 
     Channel:[email protected], 
     Code:[email protected], 

     (Status:[email protected]) when ([email protected]== "complete") , 

     OrderLines:{ 
      ((payload.Order.OrderLines.*OrderLine default []) map { 
      OrderLine:{ 
       EntryNumber:[email protected], 
       Status:[email protected], 
       Quantity:[email protected] 
      } 
     }) 
    } 

    } 

我想忽略的情況,同時檢查時的狀態。如何實現它在騾子dataweave

回答

4

您可以使用upper功能,像這樣:

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

但如何檢查傳入值的格式有效載荷?我們不得不忽略 –

+1

大寫的輸入值並將其與大寫常量進行比較。這樣他們都將大寫,所以案件在技術上被忽略。 –

+0

知道了瑞恩.. !! –