bmel:to-enum-value¶
Category: Logic & Control Flow · Returns: bmel:enum
Signature
bmel:to-enum-value(value: bmel:string)
Description¶
Converts a bmel:string to its matching bmel:enum constant by exact case-sensitive match. Returns null if the value does not match any declared enum value.
Arguments¶
| Parameter | Type | Required | Description |
|---|---|---|---|
value | bmel:string | The string value to convert. Must exactly match a declared enum value (case-sensitive). Returns null on no match. |
Examples¶
Order status as an enum
bmel:to-enum-value({getOrder:Response Payload}.$.status)
Channel as an enum, normalized first
bmel:to-enum-value(bmel:upper({createOrder:Request Payload}.$.channel))