Use Default Values for Playbook Error Handling
You can specify a default value as an input to a playbook node, if the dynamic path validation fails and the playbook node is unable to fetch the defined input value using dynamic path expression.
The following examples assign a default value as an input to a playbook node, if the dynamic path validation fails.
${default(valueof(<path>), str(<provide string input>))}
${default(valueof(<path>), int(10))}
${default(valueof(<path>), float(<4.3>))}
${default(valueof(<path>), bool(False))}
Accepted values for bool field type are True, False, 0, and 1.
${default(valueof(<path>), none())}
${default(valueof(<path>), json({}))}
indicates an empty dictionary.${default(valueof(<path>), list(int(1),int(2),int(3)))}
${default(valueof(<path>), list(mango,123,1.2.3.4))}
You can use the following syntax to assign a default value using data types to a Playbook node:
Data Type | Key |
String | str |
Integer | int |
Float | float |
Boolean | bool |
None | none |
List | list |
Dictionary | JSON |