Commander workflows may be configured to run only when a certain condition exists. When configuring a workflow comprised of one or more conditional steps, you can also use conditions to create a dependency between steps. Doing so allows you to include flexibility and control over what happens during workflows without multiplying the overall number of workflows that you have configured in the system.
For example, you might want to provide functionality to Service Portal users to backup their VMs using a script you've developed, but this requires the VM to be powered off before it runs. You also want to make sure that if the user requested the backup while the VM was powered on, it be returned to that state. Here's how these steps would look configured as a Command Workflow.
The first step powers down the VM if it's in any other state besides Not running. To do so, you make the step conditional using the following syntax:
#{target.state} -ne "Not running"
It's important to handle this step this way, instead of making the execution conditional on the state Running because there are many states a VM can be in (including Saved, Starting, Stopping, Suspended and more).
Choose Shutdown Guest OS & Stop as the action. Make sure to add a step to wait for the VM to power down completely.
In our example, the next step runs a script.
Finally, our example needs to have a third step run to power the VM back on, but only if the VM was powered off in the first step. To do this, you create another power action step that works conditionally on whether or not step 1 was skipped.
This is the correct syntax:
#{steps[1].skipped} -eq true
You can use the same basic principles to create dependencies between any two steps in a workflow.
Related Articles
Guest OS workflow steps 4Number of Views "Get Azure VM Instances" Azure import reader step may fail with error: "Could not load file or assembly '[...]' or one of … 10Number of Views Fix 500 Server Error when running command workflows via REST API 7Number of Views Workflow step fails at Configure OS Networking step 13Number of Views Known Issue: "Get Azure VM Instances" Azure import reader step may fail with error: "Could not load file or assembly '[...… 14Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago