I’m working on my first WFA development project and have ran into a hurdle I can’t seem to jump over. I ‘m looking for the way to take a location a user specifies and turn it into a local cluster name. From there I’ll be selecting an aggregate to create a new volume in for a new VMware datastore.
I created the short bit of code below to translate datacenter location to the correct site cluster name as a couple sites have multiple cluster but only one for VMware. My issue is feeding this newly assigned cluster name into the rest of the workflow so it uses the $ClusterName variable specified below throughout the workflow. I’m not necessarily looking for a complete solution but rather the general way to make this work.
If the version of WFA that you are using is 2.2, you can make use of the powershell commandlets Add-WfaWorkflowParameter and Get-WfaWorkflowParameter. These will help you to add a parameter in one of the commands, which can then be accessed in any of the commands that follow.
You will have add "ClusterName" as a parameter in the command where you are translating the DCLocation to ClusterName in the following manner: