The community is undergoing maintenance and is in Read-Only mode. Click to learn more.

Active IQ Unified Manager Discussions

Setting Aggr and vserver using custom function?


I am attempting to build a workflow that creates a volume, its mirror and it snapvaut destination, using the values users enter for the source, to then calculate values for the rest via custom expressions.


We have a naming convension which is to be adhered too and also pre defined relationships between different CDOT clusters. Im controlling text input fieds with RegEx.


I am trying to do the following...


If I define the source volumes aggregate as "aggr_dc1_0001", then the mirror volume should be placed in "aggr_dc2_0001". We have a similar pattern with vservers, and volumes. I've got my source volume fields populating via SQL queries, and that side of things is working lovely.


I have written a function that does a replace and returns the correct value for the mirrors aggregate, I know the function works I've tested it, and I get what I expect out of it.


While other fields can clearly call a function since the autocomplete box pops up, the Aggr field doesnt, and only allows me to do a search with the keys. When  I pass the function to the to the key fields, in the form like AggrTranslate($SourceVol),  I get invalid expression errors.  I dont want it to "search" for an aggregate, I know the one I want it to go to, and have a way to return that value, just cant seem to pass it in a way WFA is happy with...what am I missing?


def AggrTranslate(aggr){

  if (aggr[6] == "1") {
  return aggr.replace("dc1","dc2")

  else if (aggr[6] == "2") {
  return aggr.replace("dc2","dc1")



Thanks in advance





Kindly post your workflow. WFA designer issues are very difficult to debug unless a workflow is provided. 


I'll point you the issue, and explain the reason as well. Will also give the corrected workflow dar if possible.





If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.


The aggr field is expecting a reference.

However you are trying to pass an absolute value to the field.

So there is a mismatch, hence is the error.

You need to convert the field to accept an absolute value rather than expect a reference.





How do I convert it?




I have written a workflow to demonstrate the same. I have not been able to test it yet.

Please look into the "TestCommand" which takes the value in aggrname instead of

reference. Will work with 3.1Rc1.





Thank you very much, this is very much appreciated.


My knowledge of WFA is only what I've been able to work out off my own back, so this will really help.

NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner