Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Custom Decision Snapshot Script

$
0
0

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.


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>