Unable to save a JSON trigger in the visual editor due a format error
Scenario
When saving a workflow in the visual editor (or the code editor), the visual editor displays
a Wrong format breadcrumb
the Apply option is disabled
What’s happening?
When adding a trigger, the visual editor includes some validation checks for the JSON code and displayed the Wrong format breadcrumb if validation of the JSON trigger code fails.
When adding the trigger in the workflow Triggers dialog box
it validates the code format
disables the Apply option is a format error is detected
Typical format errors include:
missing one of the pair of code brackets - opening or closing brackets for each component
unrecognized or incorrect character in the JSON code
Unrecognized characters may occur when copying and pasting code from a text editor: typical errors include unrecognized bracket character; unrecognized parentheses character.
Solution
To solve this, check the code format
required elements of the trigger are included correctly: event; condition; action
ensure all paired brackets in the code are present
check for unrecognized characters, for example
unrecognized characters used for parentheses
different characters used for paired brackets
Once the JSON trigger code is fixed, choose Apply in the visual editor.
Check the JSON trigger using a JSON validator tool before adding to the visual editor. These easily identify missing paired brackets and any unrecognized characters.
A second validation occurs when choosing Save in the visual editor: the trigger is checked for inconsistencies with the workflow: state names; approval names. A JSON trigger code validation error is displayed if an inconsistency is found.
See also