Skip to main content

Cyware Orchestrate

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.

  • ${<dynamic path> | default::str::<provide string input>}

  • ${<dynamic path> | default::int::<1>}

  • ${<dynamic path> | default::float::<4.3>}

  • ${<dynamic path> | default::bool::False}

    Accepted values for bool field type are True, False, 0, and 1.

  • ${<dynamic path> | default::None::$NONE}

  • ${<dynamic path> | default::dict::$DICT} indicates an empty dictionary.

  • ${<dynamic path> | default::list::[1,2,3]}

  • ${<dynamic path> | default::list::["ABC","DEF","XYZ"]}

  • ${| default::list::[1,2,3]}

    Example: ${event::data::title | default::str::This is Default Title}

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

$DICT