Hi,
Here are some step by step instructions for you with screenshots as a learning example to help you get started.
I recommend the first step in your workflow to use a "search or define" step to search for a volume to create your qtree within.
You can set the input paramater type to query and write some SQL queries to filter the cluster\vserver\volume.
This way your inputs can be selected dynamically rather than having to type in values. EG:
In the "Available Steps" menu type "search" and drag drop the "Search or define" step as the first step into your workflow then click in the row under the command name

Select the dictionary object type as "Volume" for the "cm_storage" scheme.

Assign a variable name for the volume (EG "Volume"), leave the default option to abort the workflow if the volume was not found and click the "Enter search criteria" link:

In the resource selection dialogue box, click "select one volume by it's natural keys" then enter variable names for the paramaters and click ok to any prompts.

Click on the step name to rename it to something meaningful (EG "get_volume") then click on the "User Inputs" tab.

Double click on the input (EG 'ClusterName') and change the input type from 'String' to 'Query'

Select the checkboxes for "lock values" and "mandatory" then click the "Enter a SQL query executed at runtime"

Enter your SQL query for the variable and click ok. EG

Repeat the process of changing the variable input types from String to Query for both the VserverName and VolumeName varabiles. When prompted for a SQL query enter the following:
ClusterName
#'--------------------------------------
#'Select the cluster.
#'--------------------------------------
SELECT
cluster.name,
cluster.primary_address,
cluster.version
FROM
cm_storage.cluster
#'--------------------------------------
VserverName
#'--------------------------------------
#'Select the data vserver.
#'--------------------------------------
SELECT
vserver.name
FROM
cm_storage.cluster,
cm_storage.vserver
WHERE
vserver.cluster_id = cluster.id
AND (
cluster.primary_address = '${ClusterName}'
OR cluster.name = '${ClusterName}'
)
AND vserver.type = 'data'
AND vserver.operational_state = 'running'
#'--------------------------------------
VolumeName
#'--------------------------------------
#'Select the data volume.
#'--------------------------------------
SELECT
volume.name AS 'volume_name'
FROM
cm_storage.cluster,
cm_storage.vserver,
cm_storage.volume
WHERE
vserver.cluster_id = cluster.id
AND volume.vserver_id = vserver.id
AND volume.junction_path <> '/'
AND vserver.name = '${VserverName}'
AND (
cluster.primary_address ='${ClusterName}'
OR cluster.name = '${ClusterName}'
)
#'--------------------------------------
Once all input types are set to query, move the vservername input up. EG

Click on the "Workflow" tab and type "Create Qtree" in the 'available commands' then drag and drop it into your workflow:

Enter a name for the command variable EG "Qtree" and in the "name" parameter enter "$QtreeName". In the security style you can enter 'volume.security_style' (assuming you want the Qtree to be created with the same security style as the volume or you could enter "$SecurityStyle" if you want that as an input). In the volume paramater click the right side. EG

Note: You can have WFA automatically select a Qtree name based on your storage teams naming standards and automatically increment the name instead of having to type the name manually.
Enter input variables to filter the volume:

Click ok and yes to update variable references then save your workflow.
When you preview\execute it you should now have workflow that searches for volume, enables you type in a qtree name to create on that volume. EG:


EG:
cluster2::> qtree show -vserver vserver2 -volume v
volume_001 vserver2_root
cluster2::> qtree show -vserver vserver2 -volume volume_001
Vserver Volume Qtree Style Oplocks Status
---------- ------------- ------------ ------------ --------- --------
vserver2 volume_001 "" ntfs enable normal
vserver2 volume_001 qtree_001 ntfs enable normal
I hope these instructions help. Cheers
/Matt
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.