I'd like to retrieve client information when initializing an Oracle Forms application. When I use WEBUTIL_HOST.Blocking('whoami') within the WHEN-NEW-FORM-INSTANCE trigger, I encounter the following error:
oracle.forms.webutil.host.Host bean not found. WEBUTIL HOST. Execute will not work.
However, if I call the same function later, for instance in the WHEN-TAB-PAGE-CHANGED trigger, it functions correctly. What would be the appropriate approach to achieve this after the application has started?
I have found the solution here.
You have to do it with a timer. As soon as the form is initialized, the timer will fire. In the trigger
WHEN-TIMER-EXPIREDyou can call theWEBUTIL_HOST.Blocking('whoami').So the code looks like that:
In the trigger
WHEN-NEW-FORM-INSTANCEyou need to create a timer, which fires 100 ms after the form is initialized and will not repeat.The
WEBUTIL_HOST.Blocking('whoami')call goes toWHEN-TIMER-EXPIRED.