Hey everyone,
I am trying to create a custom decision, that when the value is true, it will continue with the rest of the workflow. If the value is false, then I want the workflow to end with an exception.
In my 'Have any snapshots' decision:
Success: shutdownVM (Next step in the workflow if there IS NO snapshot)
Failure: send email (Next step in the workflow if there IS a snapshot)
Script:
if(snapshots.length = 0){
return true;
}else{
return false;
}
My logic behind this: If the length of the snapshot is equal to 0 I want the workflow to continue with the next step (shutdownVM) If the length of the snapshot is anything but 0 then I want the workflow to end and send an email.