Community maintenance is complete. Thank you for your patience!

Active IQ Unified Manager Discussions

How to use a calculated value in a command as value in Parameter

raj_shrivastava11

Hi Team,

 

I have written a attached workflow wherein i m creating a volume in first command, then Qtree part comes in. I dont want user to put the qtree name instead i have added a custom powershell command to get a "Qtree Name" from "DFS mgmt" because "Qtree Name" should be unique in the entire domain.

 

I am able to get a "Qtree Name" from "DFS mgmt" but i need to use that name for further commands like "CIFS share creation and further on".

 

Need help about how i can do this.?

 

So in attached WorkFlow i get a qtree name in variable "$QtreeName" but how i can pass the value of this to qtree1 to use it in further commands?

 

 

1 ACCEPTED SOLUTION

korns

Others may have others ideas, but you are in a place others hit often. You need the run-time results of one command to be useable in another subsequent comamnd of the workflow. People's first thought is getting the result into an MVEL namespace variable so you can then pass it to the subsequent command step. However, that is not possible (a longer story).

 

WFA does have the ability for one command to create and set a workflow-global variable and a subsequent workflow command step can get to that variable ... using (check Developer Guide and check exact spelling of cmdlets):

    Set-WfaWorkflowParameter

    Get-WfaWorkflowParameter

 

So something like:

  • modify your 1st command to load it's result into a workflow parameter using Set-WfaWorkflowParameter, say: myQtreeName
  • modify your 2nd command to get that value using Get-WfaWorkflowParameter to get myQtreeName

 

This probably means you can't use the built-in certified commands to cretae a qtree, share, etc (anything that needs to access myQtreeName). You will need to clone them and then modify them to use Get-WfaWorkflowParameter rather than a passed input parameter.

View solution in original post

2 REPLIES 2

korns

Others may have others ideas, but you are in a place others hit often. You need the run-time results of one command to be useable in another subsequent comamnd of the workflow. People's first thought is getting the result into an MVEL namespace variable so you can then pass it to the subsequent command step. However, that is not possible (a longer story).

 

WFA does have the ability for one command to create and set a workflow-global variable and a subsequent workflow command step can get to that variable ... using (check Developer Guide and check exact spelling of cmdlets):

    Set-WfaWorkflowParameter

    Get-WfaWorkflowParameter

 

So something like:

  • modify your 1st command to load it's result into a workflow parameter using Set-WfaWorkflowParameter, say: myQtreeName
  • modify your 2nd command to get that value using Get-WfaWorkflowParameter to get myQtreeName

 

This probably means you can't use the built-in certified commands to cretae a qtree, share, etc (anything that needs to access myQtreeName). You will need to clone them and then modify them to use Get-WfaWorkflowParameter rather than a passed input parameter.

View solution in original post

raj_shrivastava11

Thanks Korns.

Announcements
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
Public