The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to reigister at next log in.Please note that access to your NetApp data may take up to 1 hour.To learn more, read the FAQ and watch the video.Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.
WFA doesn't provide nested looping. But with some innovative and intelligent workflow design you can very well achieve it.
Let's see how.
I'm taking an example where I need to
Create 'l' aggregates.
On each of those 'l' aggrs, I need to create 'm' volumes.
And on each of those 'm' volumes, I need to create 'n' qtrees.
Its 3 level of nested structure but this design can take care of absolutely any level of nesting; 4,5...6. anything.
You first need to plan. Plan the naming pattern for the objects at each loop, it will be important. You need to find ways to keep the naming of objects created unique. Using time-stamp is very useful here.
The outer-most level i.e. the outermost loop will be a command that need to be looped 'l' times. Straight fwd. No issues here.
Now I need some filters.
For every inner loop, you need to create filters that will be able to return ONLY the objects created by the immediate outer loop. One such filter for every inner loop.
In our case the 2nd inner loop is to create volumes, so I need to have create a filter that will only return the aggrs that got created in the outer loop.
Similarly the 3rd inner loop i.e. create qtrees, I need to have a filter that will return ONLY the volumes created in the previous loop.
The best way to do this is to have "Filter with name like". So have your objects created in a naming pattern that doesn't exist previously.
My cluster have aggr0, aggr1. Now I create aggr with name like agregate___1, aggregate___2, aggregate___3 etc. Volumes like vol__<time_stamp>__1, vol__<time_stamp__2 etc.
So now I can have a filter to query aggregates with name like %aggregate___% which will return only the 3 aggrs created. Have one finder with only a single filter created for each of the filters.
For every inner loop, you would need a child workflow in the next row. The CW row will be looped 'm' times. In the child workflow you have only your command and loop it for member in group. Now you
you can use your finder to return each of the objects created in the immediate upper loop.
Its much easier to understand by looking at the workflow itself. So lets do it.
Import the given workflow Workflow_to_Create_l_aggrs__m_volumes_per_aggr__and_n_qtrees_per_volume__sinhaa.dar and it will be clear to you. You would need WFA3.1 for it.
Provide inputs as the below image and preview it. provide smaller number of objects to understand the flow, then as you wish. see the flow to understand what's happening.
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.