Guidelines for workflows
You must be aware of the guidelines for creating or modifying a predefined workflow for OnCommand Workflow Automation (WFA).
General guidelines
Guidelines | Example |
---|---|
Name the workflow such that it reflects the operation that is executed by the storage operator. |
|
For workflow names, capitalize the initial letter of the first word and every word that is an object. Capitalize letters for abbreviations and acronyms. |
Volume Qtree Create a Clustered Data ONTAP Qtree CIFS Share |
For workflow descriptions, include all of the important steps of the workflow, including any prerequisites, result of the workflow, or conditional aspects of execution. |
See the description of the sample workflow
|
Set “Ready For Production” to true only when the workflow is ready for production and can be displayed in the portal page. |
None |
By default, set “Consider reserved elements” to true. When previewing a workflow for execution, the WFA planner considers all of the objects that are reserved along with the existing objects in the cache database. Effects of other scheduled workflows or workflows executing in parallel are considered when planning a specific workflow if this option is set to true. |
|
By default, “Enable element existence validation” is set to true. |
|
When the same command is selected more than once in a workflow, provide appropriate display names for the command instances. |
The “Create, map, and protect LUNs with SnapVault” sample workflow uses the |
User inputs
Guidelines | Example |
---|---|
Names:
|
|
Display names:
|
|
Descriptions:
The user input descriptions are displayed as tooltips for the user inputs during workflow execution. |
Initiators to be added to an “iGroup”. For example, IQN or WWPN of the initiator. |
Type: Select Enum as the type if you want to restrict the input to a specific set of values. |
Protocol: "` iscsi`", “fcp”, “mixed” |
Type: Select Query as the type when the user can select from values available in the WFA cache. |
$Array: QUERY type with query as follows: SELECT ip, name FROM storage.array |
Type: Mark the user input as locked when the user input should be restricted to the values that are obtained from a query or should be restricted to only the supported Enum types. |
$Array: Locked Query type: Only arrays in the cache can be selected.$Protocol: Locked Enum type with valid values as iscsi, fcp, mixed. No other value than the valid value is supported. |
Type: Query TypeAdd additional columns as return values in the query when it helps the storage operator to make the right choice of user input. |
$Aggregate: Provide name, total size, available size so that the operator knows the attributes before selecting the aggregate. |
Type: Query TypeSQL query for user inputs can refer to any other user inputs preceding it. This can be used to limit the results from a query based on other user inputs such as vFiler units of an array, volumes of an aggregate, LUNs in a storage virtual machine (SVM). |
In the sample workflow SELECT vserver.name FROM cm_storage.cluster cluster, cm_storage.vserver vserver WHERE vserver.cluster_id = cluster.id AND cluster.name = '${ClusterName}' AND vserver.type = 'cluster' ORDER BY vserver.name ASC The query refers to ${ClusterName}, where $ClusterName is the name of the user input preceding the $VserverName user input. |
Type: Use Boolean type with values as “true, false” for user inputs that are Boolean in nature. This helps in writing internal expressions in the workflow design using the user input directly. For example, $UserInputName rather than $UserInputName == '`Yes'. |
|
Type: For string and number type, use regular expressions in the values column when you want to validate the value with specific formats. Use regular expressions for IP address and network mask inputs. |
Location-specific user input can be expressed as “[A-Z][A-Z]\-0[1-9]”. This user input accepts values such as “US-01”, “NB-02”, but not “nb-00”. |
Type: For number type, a range-based validation can be specified in the values column. |
For Number of LUNs to be created, the entry in the Values column is 1-20. |
Group: Group related user inputs into appropriate buckets and name the group. |
“Storage Details” for all storage-related user inputs.“Datastore Details” for all VMware-related user inputs. |
Mandatory: If the value of any user input is necessary for the workflow to execute, mark the user input as mandatory. This ensures that the user input screen mandatorily accepts that input from the user. |
“$VolumeName” in the “Create NFS Volume” workflow. |
Default value: If a user input has a default value that can work for most of the workflow executions, provide the values. This helps in allowing the user to provide fewer inputs during execution, if the default serves the purpose. |
None |
Constants, variables, and returns parameters
Guidelines | Example |
---|---|
Constants: Define constants when using a common value for defining parameters to multiple commands. |
AGGREGATE_OVERCOMMITMENT_THRESHOLD in the |
Constants: Names
|
AGGREGATE_USED_SPACE_THRESHOLD ActualVolumeSizeInMB |
Variables: Provide a name to an object defined in one of the command parameter boxes. Variables are automatically generated names and can be changed. |
None |
Variables: Names Use lowercase characters for variable names. |
volume1 cifs_share |
Return parameters: Use return parameters when the workflow planning and execution should return some calculated or selected values during planning. The values are made available in the preview mode when the workflow is executed from a web service as well. |
Aggregate: If the aggregate is selected using the resource selection logic, then the actual selected aggregate can be defined as a return parameter. |