Active IQ Unified Manager Discussions

Passing WFA workflow table thru REST

Nick_Elliott
3,102 Views

I am having problems figuring out how to pass values in table format to WFA using REST.

<userInput>
            <name>priShareAclTable</name>
            <defaultValue></defaultValue>
            <type>Table</type>
            <allowedValues/>
            <conditionalUserInput>
                <name>flagShare</name>
                <defaultValue>false</defaultValue>
                <type>Boolean</type>
                <allowedValues/>
                <mandatory>false</mandatory>
            </conditionalUserInput>
            <conditionalUserInputValues>
                <conditionalUserInputValues>true</conditionalUserInputValues>
            </conditionalUserInputValues>
            <mandatory>false</mandatory>
            <columns>
                <column>
                    <name>priShareAclTable:User or Group</name>
                    <type>String</type>
                    <allowedValues/>
                    <mandatory>false</mandatory>
                </column>
                <column>
                    <name>priShareAclTable:Access Level</name>
                    <defaultValue></defaultValue>
                    <type>Enum</type>
                    <allowedValues>
                        <value>CHANGE</value>
                        <value>FULL_CONTROL</value>
                        <value>NO_ACCESS</value>
                        <value>READ</value>
                    </allowedValues>
                    <mandatory>true</mandatory>
                </column>
            </columns>
        </userInput>

I've tried passing it using

 

 

<userInputEntry key="priShareAclTable" value = "true">
<priShareAclTable key="priShareAclTable:User or Group" value ="EVERYONE" />
<priShareAclTable key="priShareAclTable:Access Level" value ="FULL_CONTROL" />
</userInputEntry>

and

 

<userInputEntry key="priShareAclTable:User or Group" value ="EVERYONE" />
<userInputEntry key="priShareAclTable:Access Level" value ="FULL_CONTROL" />

both respond with:

 

 

InvalidInputException{Message: The value for input $priShareAclTable:Access Level has to be provided, Cause: null}

What am I doing wrong?

1 ACCEPTED SOLUTION

Nick_Elliott
3,081 Views

I was able to resolve with

<workflowInput>
<userInputValues>
<userInputEntry key="srnNumber" value ="RITM0000000" />
<userInputEntry key="flagShare" value ="true" />
<userInputEntry key="flagExport" value ="false" />
<userInputEntry key="flagMirror" value ="false" />
<userInputEntry key="priSite" value ="flor" />
<userInputEntry key="priEnv" value ="test" />
<userInputEntry key="priBU" value ="COR" />
<userInputEntry key="priLOB" value ="COR" />
<userInputEntry key="priVolSize" value ="10" />
<userInputEntry key="priApplicID" value ="REST_Demo" />
<userInputEntry key="priShareAclTable" value = "EVERYONE~FULL_CONTROL" />
</userInputValues>
</workflowInput>

after reading http://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/Passing-WFA-workflow-input-type-table-via-REST-API/td-p/102663

Rows are separated by "," and colums are separated by "~".  No explicit reference to the Column name is made in the request.

View solution in original post

2 REPLIES 2

Nick_Elliott
3,082 Views

I was able to resolve with

<workflowInput>
<userInputValues>
<userInputEntry key="srnNumber" value ="RITM0000000" />
<userInputEntry key="flagShare" value ="true" />
<userInputEntry key="flagExport" value ="false" />
<userInputEntry key="flagMirror" value ="false" />
<userInputEntry key="priSite" value ="flor" />
<userInputEntry key="priEnv" value ="test" />
<userInputEntry key="priBU" value ="COR" />
<userInputEntry key="priLOB" value ="COR" />
<userInputEntry key="priVolSize" value ="10" />
<userInputEntry key="priApplicID" value ="REST_Demo" />
<userInputEntry key="priShareAclTable" value = "EVERYONE~FULL_CONTROL" />
</userInputValues>
</workflowInput>

after reading http://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/Passing-WFA-workflow-input-type-table-via-REST-API/td-p/102663

Rows are separated by "," and colums are separated by "~".  No explicit reference to the Column name is made in the request.

sinhaa
3,060 Views

@Nick_Elliott

 

You may want to try this amazing post. How to generate the User-Input XML Body for executing workflows via REST APIs: The Solution

 

1. It automatically gets you the User-Input XML file. No need to manually create it.

2. You never have to worry about how to provide tables, queries, multi-select queries, passwords, comments .. or any of the User-Inputs. This solution will always take care of it, and also if any new user-inputs are added in WFA in future. Its future proof.

3. The advantage of easy decison making and changing which the GUI provided is totally available for you.

4. Make as many XML files as you need with same or changing one or more Inputs.

5. The workflow  preview is available for you. You can confirm that planning passed with the selected set of inputs. If not satisfied, go back and change it. All available for you.

6. Will reduce your time taken by more than 90%

7. It works on any version of WFA.

 

Try it, I'm sure you'll find it very useful.

 

 

sinhaa

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public