Active IQ Unified Manager Discussions

WFA workflow looping guidance

dhrumins
5,127 Views

Kevin

I have a similar question. Suppose you have a scenario where users will provide multiple source volumes as inputs and the workflow should create a new destination volume for each source volume input also create a VSM relationship between each source and destination volume combination.

Is there a way we can write a workflow to suit this customer requirement?

Thanks

Dhrumin

4 REPLIES 4

hill
5,127 Views

Hi Dhrumin

First, I've branched this conversation off from the other Discussion (Re: Ability to create a volume or other entity based on the configuration of an existing volume or other entity?).  My answer to you would depend on how you input the "multiple" source volumes.  Here are the scenarios I can think of right now:

  • limited user inputs:  Meaning you have the WFA user inputs that allow only X number of volumes as dedicated user input fields.  If you do this, then you would effectively have one workflow "row" per volume entered and you could optionally not execute the commands if no user input provided
  • delimited user inputs:  it's possible to provide a delimited list (comma, semi-colon, etc) of volumes and feed that information into the looping constructs.  The workflow row could loop through the list of inputs, and with a couple of functions to count and strip out the next volume in list, this could be very effective.
  • naming conventions:  it's possible that with good naming conventions you could 'find' all of the applicable volumes that you want to migrate / establish a VSM relationship for, etc.  if you can do this, then you can use the example I provided to Stefan.

Since this discussion is a branch from the other discussion, I will add that example here in another reply.

I'm not sure if this addresses your question, but I hope it helps,

Kevin.

hill
5,127 Views

The initial question in the other thread was:

     "How can I use such a loop in wfa for all volumes in an array? I would like to use this to check if a snapmirror relationship exists for all volumes on an array. I didn't find it in the docs."

My Reply:

Hi,

We're working on putting getting more documentation / training information available, but in the meantime, here is what I would recommend:

  • to add looping to a workflow row: edit your workflow and right-click on the row where you want looping
  • click on 'Repeat Row'
  • When the pop-up windows appears, click on 'Member in Group'

              

  • Then select a Finder Type, Finder, and applicable variables.  These variables are what you would use in your Find Charts for your commands.

              

              

If you would like to see this in a workflow, I recently posted a c-mode workflow that will remove a vServer and all it's volumes.  While not your use case, it should still prove to be a good example for how to identify all the volumes on a controller and perform various actions.  You can find that workflow example HERE.

Hope this helps,

Kevin

dhrumins
5,127 Views

Kevin, thank you very much for your elaborated reply.

About the following option:

  • delimited user inputs:  it's possible to provide a delimited list (comma, semi-colon, etc) of volumes and feed that information into the looping constructs.  The workflow row could loop through the list of inputs, and with a couple of functions to count and strip out the next volume in list, this could be very effective.

this sounds like a good trick for our usage. But the only problem I think we might face, is that while giving source volume inputs, user might provide volumes from different vservers and different clusters as well.

So does that mean we would have to have 3 delimited user inputs for Source Volumes, Sourve Vservers and Source Clusters?

I see that we have an Array as an input variable type. Is it possible to extend this variable type to suit our needs?

Thanks
Dhrumin

hill
5,127 Views

Hi Dhrumin,

The answer is that this also depends.  You could just have your other user inputs be 'static' and only allow for a single source vServer and source Cluster... while allowing a delimited list for Source Volumes.  You can also "get" the information about the vServer and Cluster from the volumes... so you don't really need them to input that information.  I guess the better way of answering is you can delimit the user inputs that make sense to you.  You could also have multiple delimiters within your single user input... one that designates volume_name, and then one for size.  This could be a combination of commas ( , ) and semi-colons ( ; ), as a possibility.

All this said, I would also say I don't find this that desirable.  If this is an "internal" type of use case, then I think it can apply and be very helpful.  However, if this is to be an "externally" facing type of workflow... where non-experts are going to look at or try to use, then that could be problematic.  if this is a workflow that will be kicked off by an external system via web-services... well... that is a totally different use case... and this type of input could be very powerful.

Hope this helps,

Kevin

Public