Subscribe
Accepted Solution

Help with a simple create qtree workflow

Hi all,

I'm new to WFA, trying to create my first workflow to get familiar with things.  I'm using a single command in my workflow, the Create QTree command.  I don't think that I'm properly understanding how the required parameters for the command are defined in the finders.  I'm trying to just setup simple "define" type finders that will allow the operator to enter the Array, QtreeName, and VolumeName, but it doesn't seem to be working...here is what I find in the server log file:

2012-01-30 12:56:42,946 CST INFO  [com.netapp.wfa.job.backend.JobsExecutionInterceptor] (WorkManager(2)-14) Job WorkflowExecutionJob{workflowId=2, userInputs={$qtree=MapValueWrapper{value='qt1'}, $Array=MapValueWrapper{value='10.26.69.137'}, $VolumeName=MapValueWrapper{value='vol0'}}} JobConfiguration{id=10, jobScheduleInfo=JobScheduleInfo{id=10}, created=2012-01-30 12:56:39.0} failed

CommandExecutionException{Message: [Error: could not access property: volume]

[Near : {... Unknown ....}]

             ^

[Line: 1, Column: 0]

Failed to resolve a mandatory parameter: 'Array' for command: 'Create QTree' using value: '$qtree.volume.array.ip' in row: 1, Cause: null}

Any pointers on how to setup a simple workflow like this, where all the required inputs are defined by the operator at run time?  Thanks!

Mike

Re: Help with a simple create qtree workflow

Welcome to the club!

The Create Qtree Define uses one Reference Variable called 'volume'.  A Reference Variable is used to refer to a different Define Chart of the specified type.  In this case, you would need a Define chart for Volume as well.  This means you need to create a Define Chart of Type Volume and place the variable name in the Define Chart for Qtree.  The Define chart for Volume also contains two Reference Variables for Array and Aggregate Name.  These should be defined using a Find Chart.  Find the specified Aggregate on the Array and pass those along.  This can be done with a single Command and three FindCharts.  You do want to make sure that if you decide to let the user pick an aggregate that it will likely be a good idea to  choose the controller in the event there are more than one aggr1 in your environment

Here are some examples... enjoy

Re: Help with a simple create qtree workflow

Thanks for that, it was helpful!  Is there a reason why I can't use Define Charts for both the volume name and array name, instead of using a Find Chart for the array?  I had been trying to just use define charts, since I wanted my operator to enter the volume name and array name, but I only got this to work after I referenced the array variable in the volume define chart back to a find chart. Thanks!

Re: Help with a simple create qtree workflow

You could refer to an Aggregate Define Chart but then you also need an Array Find Chart.  Ok, so the easiest way to do this and I have this in one of my workflows that I will be posting soon.  Use the Find Chart to find -any- aggregate (Find aggregate in a given array) on the controller.  This will require just a single input for the controller name or ip.  This is a built in Finder so nothing special.  The aggregate found doesn't matter since you are not creating a volume and only adding a qtree to an existing volume.

Re: Help with a simple create qtree workflow

OK...so I guess my question is this - will I always need at least 1 find chart in a work flow, or can I use all define charts?  If there always must be a find chart, can you explain why that is?  Thanks!

Re: Help with a simple create qtree workflow

You can get away with just a Define Chart and no Finder for this specific workflow.  Like I said, You would need an Aggregate Define Chart (Volume requires Array and Aggregate).  The Aggregate Define Chart requires an Array Define Chart which must have the IP as the Natural Key.  I will always use multiple Finders in my workflows to help do things like verify that a Volume exists or see if it belongs to a specific workflow.  From a number of objects necessary to define, the Finder is the easiest path but both will take you to the same destination.

Re: Help with a simple create qtree workflow

Hi Mike,

The answer is unfortunately "it depends."  For what you are trying to do, yes, it is easiest to have at least one Find Chart with a 'Finder' node.  When creating a qtree / share / export you will need to know which controller / volume to go after.  You can basically think of the 'Finder' node as a form of validation where it will confirm that the controller / aggregate / volume exists before trying to create anything.

As Jeremy mentioned, attributes that require Reference Variables don't allow constants or user input variables.  This will all lead back to having at least one 'Finder' node in one of your Find Charts.

Now... to confuse you slightly, it IS possible to have a workflow with no Find Charts and/or Finder nodes.  This will depend on the commands used in the workflow. 

Hope this wasn't too confusing.

-Kevin

Re: Help with a simple create qtree workflow

Thanks guys for all the help.  I think I understand the rules around reference variables, though I'm not sure I am clear on why the product is setup this way.  Is the idea just that we are trying to validate some of the user input using our local cache of data before trying to execute a workflow?  I'll play around a bit more and I'm sure I'll be back with more questions....thanks!