I need to check whether my VM has snapsot or not then allow the workflow to be run.
Sometimes we need to check something before run a workflow like checking the resource is available or maybe the API for a server is available.
First we need to create an action in Orchestrator:
As you see here I checked the snapshot of an Aria Automation, and If there is any then it will return nothing which is fine by me and allows workflow to be run.
But in the next line it will return “snapshot must be deleted first” and avoid the workflow to be running if it detects an snapshot on the VM.
Now the action is ready.
I created a Simple workflow to test the functionality as you see here and created an input with the name of machine, here we have to have something in the input tab otherwise the validation will not be run:
Then I will define a simple code
Then to define the validation I select the Input Form tab select Validation
If you double click on Orchestrator validation you can select the action to validate the workflow before running
As you see you can search for your action, your action should return a text or nothing, if it returns nothing then orchestrator understands that it should continue to run the workflow.
As you see in the field I defined the value as an input for the action