DataPower XA35 - processing rule - Route Action - ibm-datapower

Our processing rule includes two Tranform actions, and a Validate, and Results actions. We want to add another action between the two transform actions to do the following:
The new action will use an XSLT to evaluate an expression. If there is a match, skip the rest of the processing rule actions to go to the last Results actions. Otherwise, continue processing the rest of the actions provided by the processing rule.
What type of action do I need to use to provide this solution, perhaps "Route Action"? If yes, what would the syntax be in the xslt file to call the last Results action?
Please provide any advise.
Thank You - Eneo.

In the latest firmware, there is a "Conditional" Action, using which you can skip actions.

Related

Using getInitialProps with an optional Parameter with NextJS

I have a page which allows a user to update a record, lets call it /edit-record, I want to support /edit-record/1 as a route which would load the data (I tried using getInitialProps) but I also want to make it so /edit-record is a page (ideally the same page) but without the API call to fetch the details happening.
So if I pass /edit-record/3 it should fetch record 3, if the url is /edit-record it just awaits user events.
The issue being I tried a conditional in getInitialProps, a if(query.recordId) {} but the else clause returns a null which NextJS doesnt like; it also just feels a bit wrong in terms of the approach.
What is the better way? Ideally I don't want to create two page files to handle the two conditions as all of the logic is the same.

Hibernate Validator Depends on

Is there a way to achieve depends on behavior with hibernate validation. For instance if i have two custom validations
#InvalidAmount // Validates the amount is invalid with some custom logic
#AmountNotAccepted // Validates the currency is not accepted along with some custom logic
The idea is not to merge both of them together and throw second error only if the first one succeeds. Is there a way to do it? Something like run the second validate only first first is not an error.
For example:
#AmountNotAccepted(dependsOn = {InvalidAmount})
You may be after group sequences?

How to update a column in data page after we get the results from case execution?

I want to update a column by name A which is the output of the case.
Can we use activity for this?
What is the best way to achieve?
I used activity to perform this.
In activity I called a method "Obj-Open" with appropriate step page to get the details of the data page. We need to pass the appropriate key to fetch the particular record.
Then call the Property-Set method in the next step of the activity with appropriate step page. Here set the target and source properties accordingly.
In the next step of the activity call the Obj-Save method with appropriate step page.
Please let me know if there is any other better way to do it
Try using savable datapage in your Flow Action post processing. See my example in the attached screenshot.

Symfony2 dynamically select controller based on query result

I'm trying to create an extendible cms. I have URLs in my database like "/menu-item/content" for each of these urls there is an action specified in format "AcmeDemoBundle:Default:index".
I would like to resolve this action and call the appropriate controller based on the matched URL.
My main goal is to call the controller stored in the db directly. Before i used a method when i put a route in the end of the routings which matched all urls associate a controller with it that found out the target controller from the db, than used Controller::forward() to get the expected results. The main problem with this approach is that i need to create an unnecessary subrequest for each page load. The other problem is passing post variables to this new subrequest.
So far i've tried to listen on kernel.request event and modify $request->attributes to contain the matching _controller value, but it seems like it has no effect.
Any advice in the subject is appreciated.
I think you mixed up the forward and redirect calls. Redirect performs 301 or 302 redirects (permanent and temporary respectfully), which creates the subrequest, as you call it. Forward performs internal call (same request) to the new action. As for your second problem, as forward is an internal call within the same request, everything global stays the same (including POST variables). In my opinion, using forward might be a good solution for you (if you don't have any other low-level requirements or if you want to be even more flexible than the usual MVC operation allows).
Hope this helps.

ASP.NET MVC - How To Refresh View From Actionmethod as a response to request?

I have an action-method in a controller that takes requests coming from a variety of different views.
It is somewhat of a utility method and I simply want it to accept the parameters it is given - do something - and then refresh the view that sent the request.
Right now, the only way I see to do this is by having the method figure out what view sent it the info and do a:
return RedirectToAction("method", "controller");
For each possibility (or something similar to that).
Is there a more general way I can make my method just re-render the current view without having to explicitly identify it?
-Thanks
Your best bet is to use jQuery to post the data then utilize the results as you see fit. Otherwise you can pass in the action/controller name in the post and use them dynamically to redirect.

Resources