Create Command Workflows
You can use command workflows to perform actions on deployed VMs, virtual services, entire services, and cloud accounts. These actions are defined in series of workflow steps.
You can run a command workflow manually or on a schedule. You can also run a command workflow for a service through a policy or when rejecting a new service request.
Service Portal users may also run a command workflow on a service if you make it available in the Service Portal. Service Portal users don't have access to cloud accounts, so they can't run command workflows on cloud accounts.
For details on the majority steps that you can add to workflows, see Workflow Steps Reference. For details on supplemental plug-in workflow steps, see the readme files included with the plug-in step JAR files added to your system at <Commander_install_directory>\tomcat\wfplugins\
. See Use Plug-In Workflow Steps for more information.
Access: | Configuration > Command Workflows |
Available to: | Commander Role of Superuser and Enterprise Admin |
- On the Command Workflows tab, click Add.
You can also select an existing workflow and click Copy. This option can save you time because it copies the selected workflow's configuration.
- In the Command Workflow Configuration dialog, on the Name and Type page, enter a name for the workflow.
- Choose an available icon, or click Manage Icons to add an icon.
Service Portal users see these icons in the list of commands available for a VM. For more information, see Managing Icons for Command Workflows.
- From Target Type, choose the types of services or infrastructure that you want the workflow to be run on:
- Any Target Type — Select this option to use the command workflow for any type of service or cloud account.
- Application Stack
- Auto Scaling Group
- Cloud Account
- Database
- Load Balancer
- Virtual Service
- VM
- No Inventory Target — Select this option to use the workflow without targeting infrastructure managed by Commander. For example, you could use a command workflow with no inventory target to update Commander custom attributes with values retrieved from an external server.
- Click Next.
- On the Steps page, click Add, select a step to include in the workflow, and then set its configuration parameters in the step details section.
- By default, steps execute automatically. To execute when only specific conditions are met, from Step Execution, select Execute when conditions are met, then click Edit and define the conditions. For more information, see Make Workflow Steps Conditional.
- To set up who is to be notified by email when command workflow actions occur, see Set up email notification for command workflows.
- Optional: By default, if a step fails when a workflow is run, no re-attempt is made. If you want the workflow to re-attempt to execute a step if it fails, select an added step from the Step Order section, then click Add > Retry Selected Step. For more information, see Add Retry Steps to Workflows.
- Continue to add steps to the workflow, as appropriate, then click Next when you're done.
To change the order of a step, use the up and down arrows, or click Delete to remove it.
- On the Permissions page, choose the users and groups that will have access to this workflow.
- On the Options page, do any of the following, then click Next:
- If this workflow is to be made available to Service Portal users, enable Display in Service Portal. Note that to use the workflow, Service Portal users must have the Run Command Workflows permission. For more information, see Service Portal Permissions.
- If you want to provide users with a custom message to inform them about the purpose of the workflow, as well as its potential impact, enable Prompt for Confirmation.
Line breaks are preserved, but other formatting isn't applied to the message. If you don't enter a message, the default message "Are you sure you want to run the command "<workflow name>"?" is displayed.
- On the Summary page, enter details about the workflow in the Description of Changes field.
For example, you might describe the purpose of a new workflow or, if you are editing an existing workflow, the nature of the changes that you made.
- Review the workflow's configuration details, and click Finish when you're done.
Manage icons for command workflows
You can assign icons to command workflows. Portal users see these icons in the list of commands available for a service. Commander includes several icons by default, but you can also add custom icons.
Files must be no more than 1 MB in size and must be .gif, .jpeg, or .png files. They should be 36 x 36 pixels for best results.
Access: | Configuration > Command Workflows |
Available to: | Commander Roles of Superuser and Enterprise Admin |
- On the Command Workflows page, click Manage Icons.
- In the Manage Workflow Icons dialog, do the following:
- To add an icon, click Add, navigate to the icon you want to add, and click Open.
- To delete an icon, select the icon in the list and click Delete.
- Click Close.
Set up email notification for command workflows
To set up email notification for command workflows, you should use a Send Email workflow step in the command workflow. The Send Email workflow step allows you to customize the email and use variables to create dynamic recipient lists.
For more information on how to configure workflow steps that send emails, see Workflow steps that send an email.
If you set up email notification through a workflow step, it's recommended that you disable any legacy email notification that may have been configured.
Formatting in the email body
The <a>
tag is automatically added to links in emails (only the HTTP protocol is supported). For example, if the value of a custom attribute is a link, the value will be formatted as a link in the email.
If you don't use HTML markup in the email body, the body is assumed to be plain text; <br>
and <p>
tags are automatically added for new lines.
If you add HTML markup to the email body, no additional tags are added.
In any text field that supports variables, click to open the script editor and select variables for the current context.
Set up legacy command workflow email notifications
Commander still supports a legacy method for setting up email notification for command workflows. This method requires that you choose a set of command workflow triggers for sending emails and whether emails are sent to the workflow initiator and component owners.
Although this method for email notification is still supported, configuring email notification within the workflow itself is now the recommended method.
Access: | Configuration > Command Workflows |
Available to: | Commander Role of Superuser and Enterprise Admin |
- Click the Notifications tab.
- In the For Each Command Workflow section, select the type of notification to send to the user who initiated the workflow and to the resource owner:
- None: No notification email is sent
- Done: A notification email is sent when a service request is completed or rejected
- Basic: A notification email is sent only when a workflow is completed or skipped
- All: A notification email is sent when any change occurs in a workflow
- Click Save.
- In the For All Recommendations section, click Add.
- In the Manage Command Workflows Notifications dialog, enter the user account to whom the email is to be sent and click .
The account information is displayed in the dialog.
- Click OK.
The user account is displayed.
- Repeat for as many user accounts as is required.
To cancel email notification for a user, select the user's account info and click Delete. Then click OK to delete the user account. Only the email notification is canceled, not the user account itself.
Delete command workflows
At any time, you can remove a workflow from Commander. After you have removed a workflow, all settings associated with the workflow, including approvers and actors, emails, scripts, and any deployment information, are no longer available. To use those settings again, you must associate them with another workflow.
Access: | Configuration > Command Workflows |
Available to: | Commander Role of Superuser and Enterprise Admin |
- Select a listed workflow.
- Click Delete and confirm the deletion.