2013-03-11 07:33 PM
Just gotten into WFA and have looked at a couple of the training videos. Overall the tool is very impressive and polished.
I'm trying to better understand the purpose of filters and finders. I understand that a filter is essentially a one way query, while a finder is a multi-way query (multiple filters). But the terminology is throwing me off.
What is strange to me is that it was very difficult to get a drop down list of arrays to work with a command. If I choose the filter "Get all arrays," I would assume that I would have a drop down list of all arrays to work with. But I don't. Instead the behavior seems more like "randomly choose one out of all my arrays." (And maybe it is just me, but I would think "randomly choose one of my arrays" would have to be one of the most useless things around!)
If I open up the user input, add a variable of type query, and put in the same query from that filter in...then I get my drop down. Which is good, but very awkward. Wouldn't it be nicer if when I wanted to choose an array (or aggregate, or volume, or interface, or....) with a drop down list, that I wouldn't have to manually intervene and write or paste in SQL code?
To me the word filter could imply "I'm giving you a set of things to choose from." It seems to not be the case here unless I'm using it wrong. It could also imply "you can only use a specific set of values" which again seems to not be the case. It seems more like, "narrow down my list of choices and then I will choose randomly from the pile."
Am I missing something? Am I using the filters wrong? I really hope I am, or that there is a better way to present simple drop downs that I'm unaware of.
Solved! SEE THE SOLUTION
2013-03-12 02:22 AM
You seem to have a few questions / statements and I will attempt to answer them as best I can. Others will likely have similar answers / responses.
I hope this helps,
2013-03-12 05:48 AM
Thanks for the thorough information Kevin, it is much appreciated. I will check out the reference manual later today.
Based on this I think I will need to employ a combination of user input and filter for my desired result, if a command requires a reference variable. I would enable a filter like "get array by name", and in the name section, put $array_name_var. Then define a query for $array_name_var to give the user a drop down. This will return the appropriate array object, based on user selection, to the command.
To hopefully clarify, my confusion with filters isn't at all with your point #1 (identify a list of objects based on certain criteria), it is with your point #3 (that they produce 1 result every time). I understand now that you've explained it that the "get all arrays" will return one result, but I wouldn't expect something called a filter that said "get all arrays" to return one array. Does that make sense, from a usability standpoint? I don't think that the behavior itself is bad, I just think if it were somehow better named or better documented in the WFA tool itself, it could save confusion.
Also, even though I don't think I will be using filters/finders much, I do think it would be better to display the result before the command runs. Again, just my opinion, but if I did include a filter for find volume < 50% full, I would still appreciate it telling me "I chose user_data_volume" before the workflow executes, even if it is in a different section of the window for user input. Right now it seems to select and keep that information in the background, and I can only see what was chosen by looking at the execution details.
2013-03-12 08:12 AM
I think I understand your confusion and I would like to add my two bits. Kevin did a great job of explaining how Filters and User Input queries work but I would like to expound upon it further.
Filters: The idea of a filter is to tell the WFA server to give me the top returned value based upon the id column of a SQL query. The best practice is to create a SQL query that looks for a single object type and would not be an overly complicated query. For Example: Get All Arrays would be a query that returns a list of Array objects with a LIMIT 1 value. Why only one value? I think that this is where some of the confusion lives. In order to create an object, we need only one value in the Command, right? So if this is the case, then how would the command understand a list of values. Now for this reason, we need to only return the top value from a filtered list. Also, there is the concept of a Reference Variable. When you look at the Command object, there are some inputs that have a small R beside them. This indicates that it is a reference variable to a 'found' or 'declared' object. Think of this variable as the foreign key to a different table.
Finders: Kevin mentioned this and I think that it warrants some further definition. Finders are made by combining one or more Filters. Why would I want to have multiple Filters executing at once? Remember how I mentioned that Filters are going to return the output of a simple query and only the top value based on the ID column? Well, Finders allow me to do more with my Filters. Now, I can set my Sort by Column for the Filter and/or I can combine multiple simple Filters to unlock more of the power of WFA. This is one of the keys to the real power behind WFA - Filters and Finders. Now with a Finder, I can choose the best array based on License Type (I need to create an NFS export), Data ONTAP version (the feature I want to use is only available in 8.1+) and the NetApp model. This is an example of combining Filters to make a more complex Finder object.
User Inputs: Sometimes, it is helpful to control what options a user can enter into the workflow form. There are four different types of User Input types (defined below) that can be used. The big difference between Filters/Finders and User Inputs is pre-execution selection criteria. Before a user executes, the selection criteria can be limited. This is good for manipulating specific objects but limiting possible typo issues. I can have a user select a Vfiler based on a name and then have a second drop down User Input which displays the volumes of that vFiler. After the volume is selected, a third User Input of String type is available for the Qtree name and so on. This is a great example of using a cascading User Input. Now what if I want my Junior storage admin to provision a new volume in an existing vFiler but I want that new volume in the best aggregate on my controller (let's say that I have four of varying capacity). I don't want the Junior Admin tracking down the controller and pulling out his calculator to determine the best place. I will make it easier by combining User Inputs and intelligent Filter/Finders. Now, I have a User Input query which shows the available vFilers in the environment. He selects the vFiler and enters the new volume name and other required inputs. This time, the Junior admin hits execute and based on my previously defined criteria, WFA finds the best available aggregate in the controller that owns the vFiler. Now, I can have my Junior admin provision new storage and he only has to have a very high level of NetApp knowledge.
User Input Types
I hope that this helps further explain the difference between these two approaches. If you consider Filters/Finders as used during the planning phase of Preview and Execution and User Inputs as used prior to the planning phase, then it might help as you define/design your workflows. Filters/Finders help to limit the number of required User Inputs while maintaining a level of control of the selection criteria. In regards to the last portion of your post, don't forget to use the Preview button if you want to see what WFA is planning to use based on your Filters/Finders.
Jeremy Goodrum, NetApp