How to use internationalization in Label fields in Screens in Oracle Policy Automation - internationalization

I am very new to Oracle Policy Automation. I am developing a screen which will give the option to the user to select languages. Based on his/her selection, the next screen should display a welcome message in the language selected.
I have two properties files (one for each language) and I have placed them inside the /classes/configuration folder.
Now, my query is how to invoke these properties files based on user selection and what should I write in the label field so that the messages are dynamically picked up.
Thanks in advance for the help.

I guess you may have figured this out by now.
In OPA the locale has to be set at the start of an interactive session (part of the start investigation URL) and cannot be changed subsequently. The locale specific resource files under configuration will then be used.
Your locale selection screen would probably need to be outside of OPA triggering a session start of the correct type. If you are using OWD then it will actually provide it's own locale selection screen if you try to access a rulebase without specifying the locale to use. We are working on some additional tooling around OWD to make this process a lot more straightforward

Related

Missing GA4 event parameters

I have recently started to use Google Analytics 4 for event tracking, using Google Tag Manager to send events to Analytics. I have set up the custom variables in Tag Manager as well as in GA4.
Everything seems to work very well in Tag Manager's debug mode, and also if I look up the events in real-time view I get the requested event along with all the parameters I have set in Tag Manager. However, once I look up the events for the last couple of days in the Engagement -> Event view, a couple of my parameters are missing, and also I'm not getting the same hit count for each parameter, even though each event has all parameters set:
As you can see, 86 events have been recorded, but the event count for the parameters widely varies.
Here's a screenshot of my Tag manager settings:
I have tried to set up a new event with the same parameters, but (logically) I got the same result. I am under the strong impression I'm missing something obvious here. Does anyone have experience with this, or has anyone come across this same issue?
To be honest, you can just try to click on mark as conversion in the Events tab, and this should save them. I think for some reason GA4 doesn't save parameters otherwise...
i cant get this til work with fields and parameters for an event so i try to create a user custom dimension instead and also to send it as a content group and as user property
also i can see the user id under app instance for the standard report user explorer
but i can't filter on or select this one myself
i cant create the custom parameter reports like gerrit did
but yeah create them as custom dimensions /metric first should be the way
ga4 has a bug when you edit a standard report, you add 3 card and deselect one it still thinks you are maxed out and you have to start over...
the test internal users filters dont work, though you can see data in debug and under events, but since i know they work i know try to just make the filters active

Can UFT/QTP switch system locale?

I have a test case which requires me to first change the system's locale and then start the test. I want to automate the process of changing the system locale with qtp/uft, is that possible?
Can UFT/QTP automate the change of the system locale on a window machine?
Yes you can. At the start (or other appropriate point) of your test use SetLocale(lcid) like this:
SetLocale("en-gb") ' sets locale to UK
SetLocale("en-us") ' sets locale to US
SetLocale("de") ' sets locale to Germany
This link will show you the various lcids available for use
The WINAPI SetThreadLocale might be a way of doing that, with the restriction that only the processes started by UFT will inherit it (You need to make sure that your AUT is a child process of UFT). You can use WINAPI functions via the Extern.Declare headers.
We should not forget that such practices are considered malware - doesn't matter the honest purpose - so if you really want to stay clean, make your work transparent, comply to security rules; and most of all, you have UFT - do it via the GUI as the normal user would do it.

Different behaviour for local and productive WeblogicServer

.
Hey guys,
I have a strange behaviour and am wondering why this happens:
My managed bean holds three values (selected plant, selected year and selected month). When opening the required page a #PostConstruct method is called and initializes the plant data according to the selected/pre defined plant, year and month. When changing one of these three options data should be updated and displayed via AJAX request. In order to switch to edit mode I can click my button and change one value from true to fals which is indicating whether the page should be displayed in view or edit mode.
Now here is my problem:
My local Weblogic Server (IntegratedWeblogicServer - standard configuration) works as expected. I open the page, see my current data, switch to edit mode, edit & save it. That's all. Works like a charm.
The productive Weblogic Server (configured by a colleague of mine) does some kind of cache I think. I open the page, see my current data, change year value to last year and see the updated values. When clicking on the "edit" button the old values are displayed instead of the updated values. This just happens as long as I do not switch the plant. My current workaround looks like this: open the page, switch the plant and then switch the year. After switching the plant everything works like expected. I can't figure out why the productive machine behaves different than the local machine. Each of the update methods setPlant(), setYear() and setMonth() call refreshValues() and are equal requading JSF definitions. So I don't know if it's a caching problem or maybe a Weblogic configuration problem.
Let me know if you need more information or certain code snippets. I excluded them as it is a lot of code.
Kind regards,
Stefi
Enable http headers debug from browser and monitor the difference in each environment. Also monitor the access.log on each domains server.

Re-render/refresh application on runtime

I have the following question:
I have an application that I'm using Marionette.Layout and this Layout has regions.
I want to add the option to the user to change language(on run time), meaning after the application is already render and the user is working, he can change the language and all the application should be change it to the selected language.
My Question:
1. I need to 'refresh/re-render' all the application, how is this done, I didn't found or I miss it, how to re-render the application?
I already have a a mechanism that the 'templates' are like:
https://github.com/janl/mustache.js/issues/216
This is working when the application is started, the first time, I need on run time to re-render/refresh with the new data
Unfortunately there isn't anything in the Marionette to do this for you. You will have to write the code to re-render the entire application with the new language setting, yourself.

QTP: Unique browser identificator not related to title?

In my QTP keywrord driven automation, I would like to open browser and then automatically call all functions on that browser. I noticed it does work even when the browser title changes but I am not sure whether its coincidence or not.
I would need to open browser with e.g. ID and then simply call Browser("MyID"). functions. Is there any way or I can rely on QTP even when the browser changes its name?
QTP doesn't use the title to identify the browser, the description usually is based on when the browser was created (see the Creation Time ordinal identifier). So if the state of your machine is the same (no other browsers were open before beginning to test) then the identification should be consistent.
During your testing, if there's only one Browser window open all the time , then
Just adding a "Browser" object in your OR , without any identification property would work.
If there are multiple browsers open, then you might have to add one or more of
Name
Title
Creation time.
Avoid using Creation time though.

Resources