We have integrated Websphere to support Camel integration and we have set up the DOM inventory model. So when the user reaches the product page and selects an item, an external call is made to Camel integration framework and it updates INVAVL table of Commerce.
However in page, the inventory status is still shown as unavailable. But, if the same product is chosen again, it is showing as available because the second request is made to the database directly instead of Camel request.
Any solution for this?
When Commerce calls the external system, it returns the object as returned by the external system, rather than what it stored in its caches.
This gives some discrepancies in behaviour, if the external system does not provide the full information set, that commerce itself applies to an inventory response.
Why it does this, is not really clear to me, but I have observed it to be true. It also affects physical store inventory display, as the external system will populate the external identifier of the inventory record, while the cache-only version wont. And the jsps expect it to be there.
So first run, will look ok, but subsequent executions will show no inventory.
The easiest way to debug this, is to use Soap UI to call GetInventoryAvailability on WCS both when
a) No existing cache entry is present
and
b) When an existing cache entry is present.
Then fiddle with the camel response, until it matches the response returned in b).
Typically, its fields you weren't thinking were important such as StoreIdentifier and AvailabilityTime.
Related
I have a travel website built in ASP.NET MVC 5 and EF5 with package product. Each package product has multiple set of hotels and flights defined for each day of package.
Currently, when user searches for particular package price by my application I call webservice of multiple hotel and flight suppliers to get rates and calculate the total package price after getting all the rates from suppliers.
Problem: During get rates for package my site performance is too slow as I wait to get price for all products added in package from supplier webservices for each flight and each hotel and then update the UI with the details.
I am thinking may be to use SignalR to get rates for hotel/ flight and update UI using angular to show the fastest returned response first. Once, I get all prices then will calculate total package price.
Need help in approach to follow to get high performance (less than 25 secs) in this case.
Thanks,
Vivek
Look into this approach used by most of such services that rely on external services to reply and then show best by price or availability or rating:
Take user search params and on your server or client side you may need to format them to get them ready for external providers.
SignalR hub can be used to send above params to server and now hub would wait for server to reply back and lets say run a simple call back (addToResults) function.
On Server you will use existing method of fetching results and probably have parallel calls running to different services. Once a call return results you can simply call a function on hub with Results passed to it. You may need to format results to a standard format.
On Client side the hub would know addToResults function need to be triggered and it would add obtained results to UI. You can use angular or jQuery or anything to populate UI with latest results or sort them etc.
During this time if you want you can also have different function on hub to update UI for example how many total services you are using, how many have been done and how many user should wait for.
Ideally time to wait should be reduced to service that takes most time and bit of extra meta you send and get from your server however it would be quite an improvement over what you are doing now.
Without signalR you can do something where you already know x amount of services need to be queried and you can simply do ajax calls to different functions on your server which would in return give you result of each service. When you get result from any service simply append it to results and carry on. This would also reduce time and start showing results as soon as first ajax call has returned and can also track how many left etc.
Most of the time speed would be limited to external service response so earlier you give your user indication of response from quicker service it would look speedy however if user is looking for highest rated company providing lowest price and it is returned last the wait time is only the wait it took for longest call and not accumulated wait of all calls.
In OSB Layer when the endpoint uri is changed, I need to alert the core group that the endpoint has changed and to review it. I tried SLA Alert rules but it does not have options for it. My question is, the endpoint uri should be saved somewhere in the underlying database. If so what is the schema and the table name to query it.
URI or in fact any other part of OSB artifact is not stored in relational database but rather kept in memory in it's original XML structure. It can be only accessed thru dedicated session management API. Interfaces you will need to use are part o com.bea.wli.sb.management.configuration and com.bea.wli.sb.management.query packages. Unfortunately it is not as straightforward as it sounds, in short, to extract URI information you will need to:
Create session instance(SessionManagementMBean)
Obtain ALSBConfigurationMBean instance that operates on SessionManagementMBean
Create Query object instance(BusinessServiceQuery) an run it on ALSBConfigurationMBean to get ref object to osb artifact of your interest
Invoke getServiceDefinition on your ref object to get XML service
definition
Extract URI from XML service definition with XPath
Downside of this approach is that you are basically pooling configuration each time you want to check if anything has changed.
More information including JAVA/WLST examples can be found in Oracle Fusion Middleware Java API Reference for Oracle Service Bus
There is also a good blog post describing OSB customization with WLST ALSB/OSB customization using WLST
The information about services and all its properties can be obtained via Java API. The API documentation contains sample code, so you can get it up and running quite quickly, see the Querying resources paragraph when following the given link.
We use the API to read the service (both proxy and business) configuration and for simple management.
As long as you only read the properties you do not need to handle management sessions. Once you change the values, you need to start a session and activate it once you are done -- a very similar approach to Service bus console.
I'm going to test my SOLR analyzer and I've found instructions how to do it here: https://cwiki.apache.org/confluence/display/solr/Running+Your+Analyzer.
But I need to check several thousand of words, so I'm going to do it programmatically, not manually. Does SOLR have any REST API to run analyzer?
Thank you!
The Solr Admin page is just a set of static HTML files that uses the REST API offered by Solr behind the scenes. If you watch the Network tab in your browser's developer tools while navigating it, you'll see all the endpoints it talks to.
After doing this on the Analysis page, you can see that it makes requests to three endpoints, one to fetch the HTML, then two new requests to get the schema (for the field list) and one to perform the actual analysis:
http://localhost:8983/solr/corename/analysis/field?wt=json&analysis.showmatch=true&analysis.fieldvalue=asd&analysis.query=asd&analysis.fieldname=content
How does one fire off a web request to icinga2 to set a service group into maintenance? Documentation is tough to find.
We frequently encounter false positive alerts during deployment (due to app-spinup) and would like to be able to programattically disable checking on service groups until deployment is finished.
There is no unified api yet (that's something we plan for 2.4 later this year). You should use the external commands for that - given that You must first fetch all servicegroup members and send a command ffor each I'd suggest using Livestatus. Details at http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/alternative-frontends#setting-up-livestatus
Can we add a list of domain like this :
www.google.*
into Remote Site Setting.
Google has a lot of domain :
google.com.ar
google.com.au
google.ca
....
I don't believe you can. See here for an old question that was left unanswered.
Remote Site Settings are only for HTTP calls you make from Salesforce out to another server, so if you know your contained list for outbound calls you shouldn't have to worry about new ones dynamically being needed. If you want a faster way to update this, take a look at the Metadata API, which should let you bulk change the values through underlying XML (with the caveat that you need at least one Remote Site defined in the org first).