Flex Gateway新着情報
Governance新着情報
Monitoring API ManagerFlex Gateway新着情報
Governance新着情報
Monitoring API Manager2.x
Mule 4
3.9
1.1
2.x
1.2
7.x
製品のこのバージョンは 延長サポートに入りました。
評価式が true
を返す場合は、指定されたメッセージでエラーを発生させます。それ以外の場合、この関数では値を返します。
名前 | 説明 |
---|---|
|
|
|
|
次の例では、式 isEmpty(result)
が true
であるため、(SUCCESS メッセージの代わりに) ランタイムエラーを生成します。この式が true
なのは、空のオブジェクトが変数 result
に渡されているためです。
%dw 2.0
import failIf from dw::Runtime
var result = {}
output application/json
---
{ "result" : failIf(result, isEmpty) }
DataWeave
ERROR 2018-07-29 11:56:39,988 ... ********************************** Message : "Failed
TXT
または、関数は値を出力します。
%dw 2.0
import failIf from dw::Runtime
var result = {"a":"test"}
output application/json
---
{ "result" : result failIf isEmpty($) }
DataWeave
{
"result": {
"a": "test"
}
}
Json