Hi,
When a workflow is planned, it happens in various stages:
- Each of the command instances are evaluated
- Return parameters are evaluated
- Workflow constants are also registered in the internal workflow planning result.
During the planning of the attached workflow, it seems to have hit two issues in workflow constants i.e last step above:
a. Maps in constants are not getting evaluated correctly. Please refer to bug #770193 for the case that you have raised.
b. When there is a failure in resolution of the workflow constant, the error is always displayed on the last command, though that is not the location of the error. Please refer to bug #732015 for the case registered with NetApp support.
Though not ideal, instead of using maps, as a workaround I tried using functions for the five maps you had. It seems to work for the "derived" case. I did not try the "specified" case however.
Steps tried out were:
1.. Define 5 functions as follows:
def useCaseMap(useCase) {
return [ "Home": "hd", "User'": "us", "test" : "ts" ].get(useCase);
}
def regionMap(region) {
return ['Americas' : 'am', 'EMEA' : 'em', 'APAC' : 'ap', 'Switzerland' : 'ch', 'Singapore' : 'sn', 'Hong Kong' : 'hk'].get(region);
}
def locationMap(location) {
return ['Singapore':'sg','Tokyo':'tk','Sydney':'sy','Hong Kong':'hk','New York':'ny','London':'ln','Pune':'pn','Mumbai':'mu','Jakarta':'jk','Seoul':'se','Bangkok':'bk','Shanghai':'sh','Kuala Lumpur':'kl','Beijing':'bj','Taipei':'tp','Bangalore':'bg','Atlanta':'at','Boston':'bs','Buenos Aires':'ba','Calgary':'cg','Cayman Islands':'ci','Chicago':'cc','Dallas':'da','Houston':'hs','Las Angeles':'la','Mexico':'mx','Miami':'mi','Philadelphia':'ph','Raleigh':'ra','San Francisco':'sf','Toronto':'to','West Palm Beach':'wp','Paris':'pa','Dubai':'du','Doha':'do','Dublin':'db','Poland':'po','Madrid':'md','Milan':'ml','Turkey':'tu'].get(location);
}
def businessUnitMap(businessUnit) {
return ['IT' : 'it', 'IB' : 'ib', 'HR' : 'hr', 'GC' : 'gc', 'CF' : 'cf', 'CFO' : 'co', 'PB' : 'pb', 'Risk' : 'rx'].get(businessunit);
}
def environmentMap(env) {
return ['Production' : 'pr', 'Disaster Recovery' : 'dr', 'UAT' : 'ua', 'Engineering' : 'en'].get(env);
}
2. Changed the value of constants for volumeName and vfilerName as
volumeName
if ( $workflowMethod == 'Specified' ) { return ($INPUT_Volume) } else { return 'v' + (String)(regionMap($region)) + (String)(businessUnitMap($bu)) + (String)(useCaseMap($useCase)) }
vfilerName
if ( $workflowMethod == 'Specified' ) { return ($INPUT_VfilerName) } else { return 'vf' + (String)(regionMap($region)) + (String)(businessUnitMap($bu)) + (String)(useCaseMap($useCase)) + (String)(environmentMap($env)) }
3. Remove the 5 maps from WorkflowConstants tab
4. Now, try planning for derived case.
Please try the above and let us know if it works out.
Hope this helps.
Others might respond if there is an easier workaround, since you said that it was working once.
Thanks,
Shailaja