How user inputs are defined
The OnCommand Workflow Automation (WFA) user inputs are data input options that are available during the execution of workflows. You must define the user input parameters for your workflows to enhance the flexibility and usability of your workflows.
User inputs are shown as input fields, which can be filled out with relevant data when previewing or executing workflows. You can create a user input field when specifying the command details in a workflow by prefixing a label or variable with the dollar sign ($). For example, $VolumeName
creates a Volume Name
user input field. WFA automatically populates the User Inputs tab in the Workflow <workflow name> window with the user input labels that you have created. You can also define the type of the user input and customize the input fields by modifying the user input attributes, such as type, display name, default values, and validation values.
User input type options
-
String
You can use a regular expression for valid values—for example, a*.
Strings, such as
0d
and0f
, are evaluated as numbers similar to0d
evaluated as 0 of type double. -
Number
You can define a numerical range that can be selected—for example, 1 through15.
-
Enum
You can create enumeration values that can be selected when filling the user input field using the enum type. You can optionally lock the enum values that you have created to ensure that only the values you have created are selected for the user input.
-
Query
You can select the query type when you want the user input to be selected from the values available in the WFA cache. For example, you can use the following query to automatically populate the user input fields with the IP address and name values from the WFA cache:
SELECT ip, name FROM storage.array.
You can optionally lock the values retrieved by a query so that only the results retried by the query are selected. -
Query (multi-select)
The query (multi-select) type, which is similar to the query type, enables the selection of multiple values during the execution of the workflow. For example, users can select multiple volumes or a volume together with its shares and exports. You can allow the users to select multiple rows, or restrict the selection to a single row. Selecting a row selects the values from all the columns of the selected row.
You can use the following functions when using the query (multi-select) type of user input:
-
getSize
-
getValueAt
-
getValueAt2D
-
getValueFrom2DByRowKey
-
-
Boolean
You can use the Boolean type to display a check box in the user input dialog box. You must use the Boolean type for user inputs that have “true” and “false” as the possible values.
-
Table
You can use the table type of user input to specify the column headers of a table that can be used to enter multiple values during the execution of the workflow. For example, a table that can be used to specify a list of node names and port names. You can also specify one of the following user input types for the column headers to validate the values that are entered during run time:
-
String
-
Number
-
Enum
-
Boolean
-
Query
-
String is the default user input type for the column headers. You must double-click the Type column to specify a different user input type.
You can open the Create SnapMirror policy and rules workflow in the Designer to see how the user input types are used in the “SnapMirrorPolicyRule” user input.
You can use the following functions when using the table type of user input:
-
getSize
-
getValueAt
-
getValueAt2D
-
getValueFrom2DByRowKey
You can open the Create and configure a Storage Virtual Machine with Infinite Volume workflow in the Designer to see how the table type is used.
-
Password
You can use the password type for user inputs that are meant for entering passwords. The password entered by the user is encrypted and displayed as a sequence of asterisk characters across the WFA application and in the log files. You can use the following functions to decrypt the password, which can then be used by the command:
-
For Perl commands: WFAUtil::getWfaInputPassword ($password)
-
For PowerShell commands: Get-WfaInputPassword -EncryptedPassword $password
Here, $password is the encrypted password that is passed by WFA to the command.
-
-
Dictionary
You can add the table data for the selected dictionary entry. The dictionary entry attribute selects the attribute that is to be returned. You can select a single value or multiple values while executing the workflow. For example, you can select a single volume or multiple volumes. By default, single values are selected. You can also select Rules for filtering. A rule consists of a dictionary entry attribute, an operator, and a value. The attribute can also include attributes of its references.
For example, you can specify a rule for aggregates by listing all aggregates with name starting with the string “aggr” and have an available size greater than 5 GB. The first rule in the group is the attribute
name
, with the operatorstarts-with
, and the value aggr. The second rule for the same group is the attributeavailable_size_mb
, with the operator>
and the value 5000.
The following table lists the options that you can apply to the user input types:
Option | Description |
---|---|
Validating |
You can validate the user inputs type so that only valid values are entered by users:
|
Locking values |
You can lock the values of the query and enum types to prevent the user from overwriting the drop-down values and to enable the selection of only the displayed values. |
Marking as mandatory |
You can mark user inputs as mandatory so that the users must enter certain user inputs in order to continue with the execution of the workflow. |
Grouping |
You can group related user inputs and provide a name for the user input group. The groups can be expanded and collapsed in the user input dialog box. You can select a group that should be expanded by default. |
Applying conditions |
With the conditional user input capability, you can set the value of a user input based on the value that is entered for another user input. For example, in a workflow that configures the NAS protocol, you can specify the required user input for protocol as NFS to enable the “Read/Write host lists” user input. |