Active IQ Unified Manager Discussions
Active IQ Unified Manager Discussions
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
-Kev
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.
Cheers.
sinhaa
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.
Regards
Abhi
How do I convert it?
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.