条件指令(if, then, else) conditional-instruction
高级编辑器中支持条件指令(if, then, else)。 它允许定义更复杂的表达式。 它由以下元素组成:
- if:首先要计算的条件。
 - then:条件评估结果为迟谤耻别时要评估的表达式。
 - else:条件评估结果为蹿补濒蝉别时要评估的表达式。
 
NOTE
          所有表达式均需要括号。
          if  (<expression1>)
then
   (<expression2>)
else
   (<expression3>)
            <expression1>必须返回?布尔值。
<expression2>和<expression3>必须具有相同的类型或兼容的类型。 支持的签名和返回的类型包括:
boolean,boolean : boolean
dateTime,dateTime : dateTime
dateTimeOnly,dateTimeOnly : dateTimeOnly
decimal,integer : decimal
integer,decimal : integer
integer,decimal : decimal
duration,duration : duration
string,string : string
listBoolean,listBoolean : listBoolean
listDateTime,listDateTime : listDateTime
listDateTimeOnly,listDateTimeOnly : listDateTimeOnly
listDateOnly,listDateOnly : listDateOnly
listDecimal,listDecimal : listDecimal
listInteger,listInteger : listInteger
listString,listString : listString
            用法
条件指令允许您通过减少条件活动的数量来优化历程工作流。 例如,在同一操作活动中,您可以仅使用一个条件表达式为字段定义指定两个替代项。
操作活动的示例(用于预期字符串作为条件指令结果的字段):
if (startWithIgnoreCase(@event{eventiOSPushPermissionAllowed.device.model}, 'iPad') or startWithIgnoreCase(@event{eventiOSPushPermissionAllowed.device.model}, 'iOS'))
then
   ('apns')
else
   ('fcm')
            recommendation-more-help
            
          b22c9c5d-9208-48f4-b874-1cefb8df4d76