st2flow icon indicating copy to clipboard operation
st2flow copied to clipboard

Fail to load workflow if definition contains schema/model validation error

Open m4dcoder opened this issue 5 years ago • 0 comments

If the workflow definition contains schema error such as having a duplicate key in the action input of a task, then st2flow will fail to load the entire workflow.

The developer console will return the following error.

Uncaught (in promise) TypeError: Cannot read property 'toObject' of undefined
    at OrquestaModel.validate (main.js:1)
    at workflowModelGetter (main.js:1)
    at flowReducer (main.js:1)
    at reducer (main.js:1)
    at rootReducer (main.js:1)
    at dispatch (main.js:1)
    at main.js:1

More detail root/cause is returned if user open a new canvas and then cut and paste the workflow definition into the text editor.

m4dcoder avatar Jan 16 '20 23:01 m4dcoder