Active IQ Unified Manager Discussions

exception throws when I tried to POST a workflow execute using REST API

NEEDHEXIANG
3,237 Views

Hi ,

I am testing the example got from the WFA_REST.rar file https://communities.netapp.com/docs/DOC-21510

got an exception , anyone can help me on it?

EJBException: InvalidInputException{Message: The values for $ClusterName have to fit SELECT

    cluster.name AS Name,

    cluster.primary_address AS 'Primary Address'

FROM

    cm_storage.cluster

ORDER BY

    cluster.name, Cause: null}

+ "<userInputEntry value='192.168.0.1' key='PrimaryAddress' />\n"

1 ACCEPTED SOLUTION

sharu
3,237 Views

Hi

One would normally encounter this exception when the given input value for $ClusterName is different from the values which are acceptable tothe user input query define d in the workflow.

Please open WFA GUI and try to preview the workflow you have. Please note the user inputs which are available in the drop down query for ClusterName and select one of those values for your REST API Call, it should succeed.

Please get back to us if you have further queries.

-Sharu

View solution in original post

2 REPLIES 2

sharu
3,238 Views

Hi

One would normally encounter this exception when the given input value for $ClusterName is different from the values which are acceptable tothe user input query define d in the workflow.

Please open WFA GUI and try to preview the workflow you have. Please note the user inputs which are available in the drop down query for ClusterName and select one of those values for your REST API Call, it should succeed.

Please get back to us if you have further queries.

-Sharu

NEEDHEXIANG
3,237 Views

Hi Sharu,

thanks for your quick response . yes ,you are right. i change to execute another workflow and give the right parameter name , success.

by the way . i want to ask another question. in the Get example ,the code is

response.getEntity(String.class);

yes ,i can get the string result , but i want to get a  exact type , like workflow  or collection. so i changed it to


response.getEntity(collection.class)// this collection is a java class generated from the xml schema ,

i got following exception, can you tell me how can i get a generic type result, thanks

javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"collection"). Expected elements are <{http://www.w3.org/2005/Atom}collection>,<{http://www.w3.org/2005/Atom}link>


Public