Pipelet Input Parameter missing - pipeline

This is my code
Pipeline
Pipelets java
Pipelets XML
I'm passing a parameter(SKUs) value into a pipeline from js.
The value is getting passed into the pipeline but not into pipelets.
It gives me parameter SKUs in not available.
Thanks in Advance

you are trying to pass a String to a List. You could try again by making Pipelet Input Parameter "SKUs" type "java.util.List<java.util.String>".

If your SKUs parameter is passed to the pipeline using JS client (via post or get), your pipelet needs to process type String[].

Related

ASP.Net QueryString Sort Parameter with Dojo JsonRest Memory Store

I have made a gridx grid that uses a JsonRest Memory store from the dojo framework
http://dojotoolkit.org/reference-guide/1.10/dojo/store/JsonRest.html
the issue is I do not know how to pull out the sort parameter from the query string.
The url being formatted from the JsonRest call is
/admin/sales?sort(+DealershipName)
using the following statement gives me a null error
String sort = Request.QueryString["sort"].ToString();
Looking at the debugger I see the following (I need more rep to post images :( )
ok I can see that the following variables hold this value.
Request.QueryString = {sort(+DealershipName)}
type : System.Collections.Specialized.NameValueCollection
{System.Web.HttpValueCollection}
but the array is null.
I'm thinking I can do two thing. Parse the string myself or overload the dojo JsonRest Memory store. Parsing the string seems easier but if anyone has any idea or knows any libraries that can help me out. I would greatly appreciate it.
dojo/store/JsonRest has a sortParam property that you can set to the name of a standard query parameter to use instead of sort(...) (which it uses by default to avoid colliding with any standard query parameters).
For example, adding sortParam: 'sort' to the properties passed to the JsonRest constructor will result in the query string including sort=+DealershipName instead.
http://dojotoolkit.org/reference-guide/1.10/dojo/store/JsonRest.html#sorting
If the + also presents a problem, you can also override ascendingPrefix to be an empty string (''). Note that descending sort will still be indicated by a leading - (controllable via descendingPrefix).

how the redirect in grails controller works

I am using redirect to pass the model object from one method to another method in grails. How can I get the values of that model object in another method.
See my code here
redirect(controller:"inquiry", action:"createSSVInvestigation", model: [inquiryInstance:inquiryInstance], params:['inquiry.id':inquiryInstance.id])
So in the action createSSVInvestigation how can I get the values of inquiryInstance object.
redirect(controller:"inquiry", action:"createSSVInvestigation",params:['inquiryId':inquiryInstance.id])
In createSSVInvestigation action,We get the id of inquiryInstance by params.inquiryId.
def createSSVInvestigation(){
def inquiryInstance= InquiryClassname.get(params.inquiryId)
}
You can use params to pass all your objects/variables and access them from your params in createSSVInvestigation action. Also model is not part of redirect parameters here.
redirect(controller:"inquiry", action:"createSSVInvestigation", params: [...])
Use this
flash.chainModel.inquiryInstance
Update:
The original question was to get inquiryInstance which was set in model. In documentation its mentioned that we should use flash memory. So this is a way to access flash variables once you chain controllers.

Invoke Method in WorkFlow expecting Optional Parameters to be passed?

I have method in Business Layer, which contains some optional parameters.
When I am trying to invoke the method from the WorkFlow 4.0, it is expecting me to pass
the optional parameters also.
Is there a way that I can avoid passing optional parameters to the method.
The method that I have is SendEmail(string emailTo, string domain, string smtpAdress = "POP");
When I call this method any where in the code.. I am just calling the method like
SendEmail("xx.com","PFE"), which is working fine
But in the Workflow..it gives a compilation error saying that
" 'BLEmail' does not have a public instance method named 'SendEmail' matching the parameter types, generic type arguments, and generic type constraints supplied to InvokeMethod 'InvokeMethod'."
When I am passing the optional parameter, it works fine..but it loses the whole concept of optional parameter.
Please help..
Thanks and appreciate your feedback.
Sam.
InvokeMethodActivity does not handle optional parameters. You have to provide all parameters regardless if they are optional or not.

How to write method having many parameters in REST webservice

I need to develop a web method that has many parameters. In REST, I understand a webservice has its own significance by attaching itself to particular entity and HttpVerb determines operation type.
This webmethod cannot be associated with an entity, it just calls a stored procedure and returns data, so I assume it only has only a GET method. But it has too many parameters to be fit into a URL. So, do I need to consider using POST method instead of GET.
It wouldn't really pass as 100% true to REST but you can have one web method that you call that looks at query string part of the url to get the additional parameters.
You would have a web method with a route of '/GetData'.
domain.com/GetData?Parameters=firstParm=1^secondParm=info^thirdParm=test
then in the web method, you would check the query string for Parameters and then split the string by the '^' symbol.
or
domain.com/GetData?firstParm=1&secondParm=info&thirdParm=test
this you would have to do a query string for each parameter.

Enumeration and getParametnames method of request object

I'm sending the data from HTML page to the Servlet and in Servlet I'm using the Enumeration from request.getParameterNames(), but I'm not getting the data in the sequence in which it is send by the HTML page. How can I obtain it?
getParameterNames() returns the names of the parameters. Not their values. Use getParameter(String parameterName) to get the value of a parameter. The javadoc is your friend.

Resources