In the Workflow editor window, the Activities pane groups the Workflow activities. The following table lists and describes all of the default activities.
Control Flow
Activity Group/Name |
Description and Usage |
---|---|
Acquirelock |
Allows the Workflow engine to obtain a lock on an entity name, for example, a client, a folder, or a file. During Workflow execution, other Workflow jobs running on the same entity name are blocked. This is useful when you want only one workflow acting on something or only one workflow of the same type started at one time. Note: Workflows running on the same workflow engine and workflows running on multiple workflow engines are blocked by this activity. This activity requires the following inputs:
|
Break |
Exits from a loop (for example, a loop initiated by the ForEach activity) so the remaining items in the list are not processed. Typically, you add a Decision activity inside the loop where you define an expression that triggers the Break activity. |
Decision |
Determines the path that the Workflow takes based on a trigger condition. To specify the condition, the expression input must be set. This input is a Java or JavaScript expression that returns a Boolean value, which divides the Workflow into two different paths: the true and false condition. This input typically consists of:
|
Delay |
Pauses a Workflow thread (of activities) for a specific period of time. This activity requires the following inputs:
|
ExecuteProcessBlock |
Allows you to run operations defined in a ProcessBlock or OnWorkflowComplete activity block, at any given point in the Workflow. For example, when you define a ProcessBlock you can reuse activities that need to be executed more than once in your Workflow, similar to calling a subroutine. The ProcessBlock can have inputs defined that can be set by the ExecuteProcessBlock activity before passing control to the ProcessBlock activity. Once the ProcessBlock completes, control passes to the activity following the ExecuteProcessBlock activity. The OnWorkFlowComplete activity is also called by the ExecuteProcessBlock activity in the same way. |
ForEach |
Receives a list of elements and executes a set of tasks for each element in the list. This activity, which behaves similar to the ProcessBlock activity, requires the following inputs:
|
ForEachJSON |
Iterates through array element inside of a JSON string. This activity requires the following inputs:
|
ForEachXML |
Iterates through XML elements by combining the functionality of the XPathQuery and ForEach activities. This activity requires the following inputs:
|
Fork |
Splits the Workflow into multiple activity threads, which can be later combined to a single thread using the Join activity. Tip: If you need to perform the same set of tasks on multiple elements, consider using a ForEach activity with parallel executions instead of the Fork activity. |
GetCurrentUserToken |
Returns the current CommServe authenticated token that is being used by the current user to execute QCommand operations. The token output is a string value. |
ImpersonateCreator |
Sets the current authenticated token to the CommCell user who created the Workflow. By default, the privileges of the user executing the Workflow are used during a Workflow execution. This user is referred as the Workflow executor. If this user does not have permissions on the CommCell objects which the Workflow operates against, but the creator does, use this activity to give the Workflow executor the same permissions as the Workflow creator during execution. |
ImpersonateExecutor |
Sets the current authenticated token to the CommCell user executing the Workflow. During the Workflow execution, the privileges of the user executing the Workflow are used by default. This user is referred as Workflow executor. If the Workflow is using an impersonation activity (ImpersonateCreator or ImpersonateLogin) to run a high level operation, use this activity to go back to the Workflow executor permissions after the operation completes. |
ImpersonateLogin |
Sets the CommCell user account to be used for executing specific activities in the Workflow. When a Workflow is created by a user which does not have permissions on the objects that the Workflow will operate against, you can use this activity to define the login credentials of a user that has sufficient privileges to perform activities defined on the Workflow. For example, if there is a script to disable any I/O operations on the server, this activity must be placed before the activity containing the script. This activity requires the following inputs:
|
Join |
Combines the multiple activity threads created from the Fork activity into a single thread. The Join activity waits until all threads directly transitioning into the Join activity execute and complete. This includes threads created by the Fork activity and threads created outside of the Fork activity. |
LogoutImpersonatedUser |
Logs off the current impersonated user. This activity is optional as the Workflow logs off all impersonated users when completed. |
OnWorkflowComplete |
Creates a separate operation block where you can specify activities that you wish to run once the Workflow ends. This activity is triggered when the Workflow job completes with one of the following states: success, failed or killed. OnWorkflowComplete is a stand-alone activity and should be defined without links from or to other activities. For example, to cover the scenario when the Workflow job is killed, you can use this activity to define some cleanup operations, such as killing other jobs that the Workflow has started. |
ProcessBlock |
Creates an operation block where you can define a group of activities that can be executed as a unit (as in a try/catch block) or a subroutine (call and return). For example, assume you want to create a try/catch scenario by defining two ProcessBlock activities. For the try block, you can set the maximum restart property to 0, so that if any activity defined in this block fails, then the entire block fails and transitions to the catch block. Similarly, in a subroutine scenario, the ProcessBlock would contain one or more activities that need to be executed multiple times within the entire Workflow and exist in different program paths. When ProcessBlock is not used, the same set of activities or code is copied multiple times to accomplish the goal. However, by using an ExecuteProcessBlock activity with a call to a ProcessBlock activity, the code need to exist only once. |
ReleaseLock |
Unlocks the specified global lock name. This activity requires the following inputs:
|
SuspendWorkflow |
Suspends the Workflow job. To continue with the Workflow, you can do the following:
|
Switch |
Determines the path that the Workflow will take based on a trigger condition. To specify the condition, the expression input must be set. This activity behaves similar to the Decision activity, with the difference that you can set up the condition values to be used, instead of being only true or false. The expression input is a string value which will divide the Workflow into two or more different paths. For example, if you have a variable that indicates the type of user registering with the Web Console, then click Insert Variable to set the variable to the expression input. The variable may look as follows: xpath:{/workflow/inputs/userType} You will be able to create separate activity paths depending on the output value (for example, 1 for an existing user and 2 for a new user). For the Switch activity, you can set a default transition that is used when all of the other transition condition values are false. For more information on using expressions, see Defining Activity Inputs Using Expressions. |
SwitchToJob |
Switches a non-interactive workflow from API mode to job mode. For information about API mode and job mode, see Setting General Properties. The SwitchToJob activity cannot be used with interactive workflows because the workflow job must be suspended to switch modes. (Interactive workflows have the Start Interactive Session workflow property set to True.) Sample Use Case A business logic workflow running in API mode can be switched to job mode when the input XML is processed after a user approves an operation. |
TransferToken |
Transfers a user's token from a master CommCell to a registered CommCell. This activity checks whether the passwords on the master CommCell and the specified registered CommCell, match the current user's token. For Active Directory accounts, passwords will automatically be considered a match as long as the Active Directory user account exists on both CommCells. All activities that users could perform on the master CommCell using their credentials, can be performed on the registered CommCell when the token transfer is effected. This applies to the following activities: CommServDBQuery, ExecuteCommand, and ExecuteScript. |
WizardBlock |
Adds Back, Next, Cancel, and Finish buttons to a series of PopupInput activities. When user navigates back and forth through these pages, the last entered input data is automatically populated on the pages. This activity also provides a hideCancelButton option to hide or display the Cancel button. |
WorkflowEnd |
Terminates the Workflow when a specified activity thread fails to complete. This activity is useful to indicate that the Workflow failed and to show the respective reason. Note: When the WorkflowEnd activity is used inside a ProcessBlock activity, the workflow will not transition away from the process block. This activity requires the following inputs:
|
EdgeDrive
The EdgeDrive activities are based on the Edge Drive REST API operations. For information on the Edge Drive REST API operations, see Edge Drive REST APIs.
Many of the EdgeDrive activities have an input for the file or folder GUID. The file GUID is an output of the UploadFile activity and the folder GUID is an output of the CreateFolder activity.
The EdgeDrive activities for files and folders and for tags and properties can be used for both Edge Drive and Edge Drive shares. For example, to delete tags from a share using the DeleteTags activity, use the shareId input in addition to the Tags input. The shareId is an output of the ShareFileorFolder activity.
Activity Group/Name |
Description and Usage |
---|---|
DownloadFile |
Downloads an Edge Drive file or folder based on the path or the GUID. |
PreviewFile |
Previews an Edge Drive file based on the path or the GUID. |
UploadFile |
Uploads a file to the Edge Drive. The file GUID is an output of this activity. |
CreateFolder |
Creates an Edge Drive folder based on the parent folder path or the parent folder GUID. The folder GUID is an output of this activity. |
DeleteFileOrFolder |
Deletes an Edge Drive file or folder based on the path or the GUID. |
ListFolderContents |
Lists the contents of a folder based on the path or the GUID. |
MoveFileorFolder |
Moves an Edge Drive file or folder based on the path or the GUID. |
RenameFileorFolder |
Renames an Edge Drive file or folder based on the path or the GUID. |
SearchFolderContents |
Searches the contents of a folder and subfolders based on the path or the GUID. The activity returns the contents that match the search criteria defined in FilterXML input. For instructions and examples of the filter XML, see Filters for Search or List APIs. |
DeleteShare |
Deletes a share based on the share ID. |
ModifyShare |
Modifies a share based on the share ID. |
ShareFileorFolder |
Shares an Edge Drive file or folder based on based on the path or the GUID. The shareId is an output of this activity. |
ViewShares |
Retrieves the list of shared Edge Drive files and folders. To retrieve a list of all available shares, do not enter values in the shareId or driveType inputs. |
AddCustomProperties |
Adds custom properties to Edge Drive files and folders based on the GUID. |
AddTags |
Adds tags to Edge Drive files and folders based on the GUID. |
DeleteCustomProperties |
Deletes the custom properties from Edge Drive files and folders based on the GUID. |
DeleteTags |
Deletes tags from Edge Drive files and folders based on the GUID. |
ListTags |
Lists the tags assigned to an Edge Drive file or folder based on the GUID. |
ViewCustomProperties |
Lists the custom properties of an Edge Drive file or folder based on the GUID. |
ViewPropofFileorFolder |
Retrieves the properties of an Edge Drive file or folder based on the path or the GUID. |
ViewEdgeDriveAccount |
Retrieves the details of your Edge Drive account, for example, the root GUID. |
Job
Activity Group/Name |
Description and Usage |
---|---|
WaitForJobCompletion |
Waits for an operation to complete and sends the completion status to the following activity in the Workflow. This activity requires the following inputs:
|
QCommands
Activity Group/Name |
Description and Usage |
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<All QCommand Activities> |
The QCommand activities are defined based on the QCommand operations executed in the command line. The options available for a QCommand are provided as inputs for its corresponding QCommand activity. For example, the QCreateBackupset activity is based on the qcreate backupset command. See how the activity inputs represent the command options:
All the QCommand activities also provide the inputs to impersonate a user. These inputs are referred to as sessionOptions:
|
ServiceNow
Activity Group/Name |
Description and Usage |
---|---|
ServiceNowLogin |
Logs on to ServiceNow REST API and acquires the OAuth token. This activity requires the following inputs:
|
ServiceNowQueryRows |
Retrieves records from a specified table in ServiceNow. This activity requires the following inputs:
|
ServiceNowGetRowByID |
Obtains records from the ServiceNow table based on the system-generated ID. This activity requires the following inputs:
|
ServiceNowAddRow |
Creates new records in ServiceNow. This activity requires the following inputs:
|
ServiceNowUpdateRowByID |
Modifies the specified records from tables in ServiceNow. This activity requires the following inputs:
|
ServiceNowDeleteRowByID |
Deletes the specified record from the table in ServiceNow. This activity requires the following inputs:
|
User Interaction
Activity Group/Name |
Description and Usage |
---|---|
EndUserSession |
Closes the last interactive user session opened. |
EndUserSessionWithOutputs |
Closes the last interactive user session opened and sends the activity outputs as a response if activity outputs are defined. |
InformationalMessage |
Displays a message to the user. To display the message, the message input must be added as a text or as html. You can change the message style to display as a pop-up message or an alert message. The pop-up message can be further classified as Information, Warning, or Error. Prior to execution of this activity, an interactive user session needs to be started by setting the Start interactive session property to True on either the Workflow property General tab or the UserInput activity General tab. If an action is defined in the Actions tab, the default time a user has to interact with this activity is 120 seconds. To change the default time, see Changing the Response Time for Interactive Activities. If no actions are defined, the workflow continues. Sample Use Case Add this activity to the end of a Workflow to display a custom message such as "Your request has been submitted for approval." |
PopupInput |
Presents a pop-up window where the user can enter data. From the Inputs tab, define the inputs the user is prompted to enter. Click Customize to validate or add additional options to the inputs, for example, to make an input a required field. For details on validating inputs, see Validating Inputs for User Interaction Activities. For details on customizing inputs, see Customizing Inputs for User Interaction Activities. Prior to execution of this activity, an interactive user session needs to be started by setting the Start interactive session property to True on either the Workflow property General tab or the UserInput activity General tab. The default time a user has to interact with this activity is 120 seconds. To change the default time, see Changing the Response Time for Interactive Activities. Sample Use Case Add this activity near the beginning of a Workflow to prompt a user to correct a problem with previously entered data. |
UserInput |
Creates an action item for a user. The user completes this action by one of the following methods:
|
Utilities
Activity Group/Name |
Description and Usage |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
AssignValues |
Allows you to update the values of Workflow inputs and/or variables during the execution of the Workflow. From the Workflow Inputs and Workflow Variables tabs, you can define the values for the inputs and variables that you want to update. For example, assume that there is a variable for a client name, and that you are using the CommServDBQuery activity to retrieve all clients in the CommCell. You can use AssignValues to capture the first client from the query by specifying the xpath expression in the Workflow Variables tab, such as:
where the client name is located in the second column of the first row. |
|||||||||
Call |
Triggers an activity through the third-party IFTTT platform. This activity requires the following inputs:
|
|||||||||
CommServDBQuery |
Runs SQL queries against the CommServe database. To query the database, the user executing the Workflow must have the Administrative Management permission on the CommServe computer. You can use predefined security stored procedures with the CommServDBQuery activity. These stored procedures check which entities and permissions are part of user and user group security associations. For information on the available security stored procedures, see Security Stored Procedure Overview. Configuration To configure the CommServDBQuery activity, provide the following details in the SQL Batch tab:
Notes
|
|||||||||
DisableLogging |
Disables the log files from recording non-error events occurring during the Workflow job. This activity is useful when you do not want the log files to show sensitive information from one or more activities in the Workflow. DisableLogging should be used along with EnableLogging to resume the log record for other activities. If the Workflow job completes (or goes pending, suspended, etc) while the logs are disabled, then the Workflow will re-enable the logs in order for them to include the exiting information. |
|||||||||
|
Sends an email to specific users using the SMTP settings configured in the CommCell Console. Emails can be sent in HTML or text format. This activity requires the following inputs:
|
|||||||||
EnableLogging |
Enables the log files after they have been disabled by the DisableLogging activity so that the log files continue to record the events occurring during the Workflow job. |
|||||||||
ExecuteCommand |
Executes a command on a specific client computer in the CommCell. The user running this activity must have the Agent Management permission on the client where the command will be executed. Important: The ExecuteCommand activity is supported for clients running Commvault Software version 10 or higher. This activity requires the following inputs:
|
|||||||||
ExecuteScript |
Executes a script defined in the Workflow. The content of the script is embedded in the Workflow. The parameters for the script content can be embedded in the script itself. The ExecuteScript activity runs the embedded script on the remote client computer defined in the startUpPath input. The user running this activity must have the Agent Management permission on the client where the script will be executed. This activity requires the following inputs:
Note The ExecuteScript activity is supported for clients running Commvault Software version 10 or higher. |
|||||||||
GetCredentials |
Allows you to get the user name and password saved in Credential Manager and use the credentials in other activities. For example, to execute activities like ExecuteCommand and ExecuteScript, you can use the GetCredentials activity to get the current credentials and use it as inputs for these activities. When the credentials change, you can modify the information in Credential Manager. This activity requires the following input:
|
|||||||||
RespondToCaller |
Sends information to the user regarding a specific event occurring in the Workflow during execution. When the Workflow is executed from the command line and it reaches this activity, it will display the resulting error code and message (obtained from XPathQuery activities) which will help to determine the course of action in the Workflow. The following inputs are required:
|
|||||||||
HttpClient |
Sends HTTP requests to access REST APIs or other web services. The response retrieved from these web services are later used within the Workflow. The following inputs are required:
|
|||||||||
IsRequestSigned |
Checks the input request XML for an authorization code when the SignRequest activity is used. The authorization code is inserted in the XML to authorize the XML that is executed based on a user request. This activity returns a True or False value. |
|||||||||
JSONToResultSet |
Converts a JSON string to a result set output. This activity requires the following input:
|
|||||||||
LogEvent |
Allows you to log an event for the Workflow job. The event can be seen in the Event Viewer window of the CommCell Console. The following inputs are required to specify the event details:
|
|||||||||
PSExec |
Executes a command on any remote client computer. The PSExec activity has the following advantages over the ExecuteCommand activity:
|
|||||||||
ResultSetToHTML |
Converts data from result sets to an HTML table. This activity requires the following inputs:
|
|||||||||
ResultSetToJSON |
Converts data from a result set to JSON. This activity requires the following input:
Output:
|
|||||||||
ResultSetToText |
Converts data from result sets to a delimited text string. For example, you can retrieve SQL data from CommServDBQuery or SQLQuery activity and convert them to a CSV file. This activity requires the following inputs:
|
|||||||||
Script |
Executes Java or JavaScript in the Workflow. Select Java or JavaScript from the Select Language box in the upper right of the Script tab. Type your code into the Script tab. Java Example In the QOperationExecute activity, you have XML to associate a CommCell user to a user group. If you want this activity to fail the Workflow when an error code is found in the XML output, you can type the following script: #Script Sample JavaScript Example The GET Client Properties REST API was accessed using the HttpClient activity. If you want to retrieve the client name from the JSON response, type the following script: var response = JSON.parse(xpath:{/workflow/HttpClient_3/output}); |
|||||||||
SignRequest |
Inserts an authentication code in the input XML request, for example: <signedRequest>...attributes name="authCode" value="1461d71e-0140-4ada-bd95-caae7test430"...</signedRequest> Use the IsRequestSigned activity to check for the authentication code. |
|||||||||
SQLQuery |
Runs queries on any SQL Server database.This activity requires the following inputs:
When the SQL query runs, the output is saved as result sets, which are further divided into rows and columns. The data type of the output is classified as follows (as seen in the Outputs tab):
For examples of how to retrieve the data from the result sets, see Retrieve Data from Result Sets. |
|||||||||
TextToResultSet |
Converts a delimited text string to a result set output. For example, when you load a CSV file to a Workflow and want to query the data, you can use the TextToResultSet activity to convert the text to SQL data and retrieve the data from the CSV file using the XPathQuery activity. This activity requires the following inputs:
|
|||||||||
UpdateJobDescription |
Updates the description of the Workflow job during execution in the Job Controller window of the CommCell. This activity requires the following inputs:
|
|||||||||
XPathMultiQuery |
Retrieves data from multiple elements and attributes from any XML output. To extract the xml data, view the XML output from the workflowengine.log file or from the command line (if the xml is generated from a QCommand), and then determine how to retrieve the exact data you need. For each element or attribute you want to extract from the XML, add a new xpaths block. On the Inputs tab, click xpaths, right-click, and then click List > New. To retrieve a value from an element, do not use an @ symbol in the xpath value:
|
|||||||||
XPathQuery |
Retrieves a single element or attribute from any XML output. To extract multiple elements and attributes, use the XPathMultiQuery activity. To extract the xml data, view the XML output from the workflowengine.log file or from the command line (if the xml is generated from a QCommand), and then determine how to retrieve the exact data you need. Tip If you plan to use the output of the XPathQuery activity in a ForEach activity, use the ForEachXML activity instead. The ForEachXML activity combines the functionality of the XPathQuery and ForEach activities. To retrieve a value from an element, do not use an @ symbol in the xpath value:
Tip Search online for more information on using XPath query language and free online query parsers that can help you construct queries. Example In this example, the XpathQuery activity is used to retrieve the job ID from the output of a qoperation execute activity. The output of the qoperation execute activity returns the following XML as seen in the workflowengine.log:
The XpathQuery inputs are:
|
Utilities - List
Activity Group/Name |
Description and Usage |
---|---|
AddToList |
Adds elements to a defined list, which is stored in the Workflow engine. This activity requires the following inputs:
|
ClearList |
Removes all the elements that were stored in a specific list. To specify the list, the listToClear input must be set. This input is a string value. |
ExistsInList |
Checks if a given element exists in a specific list. This activity will return true or false if the element exists in the list. The following inputs are required:
|
RemoveFromList |
Removes an element from a specific list. This activity requires the following inputs:
|
VM Utilities
The VM utilities activities are based on the end-user operations of the VM Lifecycle Management feature and can be used on virtual machines created by the VM Lifecycle Management feature or discovered by the Refresh Datacenters feature. For more information on these features, see the following:
-
For information on end-user operations, see End User Operations for VM Lifecycle Management.
-
For information on setting up VM Lifecycle Management, see VM Lifecycle Management Administrator Overview.
-
To refresh datacenters, go to the virtualization client, right-click the VMware instance, and select Refresh Datacenters. Select the Discover VMs check box and click OK.
Activity Group/Name |
Description and Usage |
---|---|
AttachNetwork |
Applies To: Hyper-V, VMware Attaches the virtual network switch to the virtual machine. This activity requires the following inputs:
|
CloneVM |
Applies To: Hyper-V, VMware Creates a copy of an existing virtual machine. The new virtual machine retains the same characteristics of the virtual machine from which it was cloned (such as the operating system). This activity requires the following inputs:
|
CreateNetwork |
Applies To: Hyper-V, VMware Creates the virtual network switch. Use the AttachNetwork activity to attach the virtual network switch to the virtual machine. This activity requires the following inputs:
|
DeleteNetwork |
Applies To: Hyper-V, VMware Deletes the virtual network switch.
|
DeleteVM |
Applies To: Amazon, Azure Classic, Hyper-V, VMware Deletes the virtual machine. This activity requires the following inputs:
|
PowerOff |
Applies To: Amazon, Azure Classic, Hyper-V, VMware Turns off the virtual machine. This activity requires the following inputs:
|
PowerOn |
Applies To: Amazon, Azure Classic, Hyper-V, VMware Starts a virtual machine after it has been suspended or powered off. This activity requires the following inputs:
|
Reboot |
Applies To: Amazon, Azure Classic, Hyper-V, VMware Restarts the virtual machine. This activity requires the following inputs:
|
RemoveNetwork |
Applies To: Hyper-V, VMware Removes the virtual network switch from the virtual machine. This activity requires the following inputs:
|
ReplaceNetwork |
Applies To: Hyper-V, VMware Replaces the existing virtual network switch on the virtual machine with the virtual network switch defined in the NetworkName input. This activity requires the following inputs:
|
Synchronize |
Applies To: Amazon, Azure Classic, Hyper-V, VMware Synchronizes the virtual machine with its host to update the latest information from the CommServe computer. Use this activity if the IP address is not displayed or is incorrect, or if snapshots or hard disk information is not correctly displayed. This activity requires the following inputs:
|
Workflows
Activity Group/Name |
Description and Usage |
---|---|
Workflows |
You can include any predefined workflow into another workflow in the same way you would add any other activity. To eliminate duplication, you can write reusable workflows that perform specific functions and then use them in other workflows. Centralizing common tasks helps keep workflows maintainable and organized. |