Skip to content

bmel:to-boolean

Category: Type Conversion · Returns: bmel:boolean

Signature
bmel:to-boolean(expr: bmel:any)

Description

Converts the expression to a boolean value. For strings, accepts 'true'/'false' (case-insensitive) and '1'/'0'. For numbers, zero evaluates to false and any non-zero value evaluates to true.

Arguments

Parameter Type Required Description
expr bmel:any The value to convert to a boolean. Accepts string, integer, or number.

Examples

Boolean from a 'true'/'false' string
bmel:to-boolean({createOrder:Request Payload}.$.gift_wrap)
Boolean from a 1/0 flag
bmel:to-boolean({invokeAgent:HTTP Headers}.$.X-Debug)

← Back to BMEL Reference