Active IQ Unified Manager Discussions

Question regarding volume provisioning workflow

dburkland
4,148 Views

I have a workflow that I use to provision volumes for Oracle Databases however I would like to make it a bit more intelligent. When the workflow is executed, the following user input prompt appears:

I am wondering if it is possible to put checkboxes next to each volume type for example "Archive Log" and if the checkbox is not checked, the volume is not provisioned. If so what is the proper way to add this functionality into the workflow? If you need a copy of the workflow let me know and I can provide it if necessary.

Thanks!


Dan

1 ACCEPTED SOLUTION

goodrum
4,148 Views

Dan,

I have used a very similar concept in the past in many workflows.  I use a function called isValid() and determine if the size is entered then execute the command.  This can be placed in the Advanced tab under the 'Execute this command: If the following expression is true" option.  Check out the screenshot.   In this case, I will create the volume if the value of dVolName_1 does not equal NULL.  In your case, you can use the variable for the Volume Size.  This way you can eliminate the need for a checkbox altogether.  It also means that you will need to uncheck the Mandatory Input option in the User Inputs section of the Preferences.

Function: isValid()

--------------------------------------------

def isValid(userCheck)

{

   if (userCheck == "") {

        return false;

   }

   else {

        return true;

   }

}

--------------------------------------------

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

View solution in original post

3 REPLIES 3

sharu
4,148 Views

Hi Dan

WFA is currently not equipped with an option to provide checkboxes but we will be addressing this in our upcoming releases but for the time being i can suggest a solution:

1.Create a user input :$WantArchiveLog [Accepting true or false] in the advanced tab of 'Create volume' command of the workflow.

2.Now, choose the condition:

'If the following expression is true'

Expression:$WantArchiveLog=='true'

Hence the 'create volume' command will execute only if the user wants it as specified in the input.

In the preview/execute operation, $WantArchiveLog user input is asked and the command will execute based on this input.

Hope this works for you. Please get back to us in case of further queries.

It would be helpful if you can pass the workflow so that we will be able to help you better.

goodrum
4,149 Views

Dan,

I have used a very similar concept in the past in many workflows.  I use a function called isValid() and determine if the size is entered then execute the command.  This can be placed in the Advanced tab under the 'Execute this command: If the following expression is true" option.  Check out the screenshot.   In this case, I will create the volume if the value of dVolName_1 does not equal NULL.  In your case, you can use the variable for the Volume Size.  This way you can eliminate the need for a checkbox altogether.  It also means that you will need to uncheck the Mandatory Input option in the User Inputs section of the Preferences.

Function: isValid()

--------------------------------------------

def isValid(userCheck)

{

   if (userCheck == "") {

        return false;

   }

   else {

        return true;

   }

}

--------------------------------------------

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

dburkland
4,148 Views

Thanks that did the trick.

Thanks again!

Dan

Public