The if statement isn't quite right. There is no "result.outcome" defined. It should just be "if (outcome != success)". See if-else control flow for details.
Another option would be to use a CLI script file and use the --file argument.
James R. Perkins
Thanks a lot it helps !!!!