I opened a case, I will write here once the case is closed.
Original Message:
Sent: Fri October 20, 2023 01:22 PM
From: Steven Shull
Subject: UIContext class version 7.6.1.1 vs 7.6.1.3
As Bradley stated, the name of the script here should be irrelevant. For certain scripts (like OBJECTNAME.NEW) the name matters because that's how we find the script to launch. But in this case it's tied to a launch point so the name won't be important.
I can't imagine how the Spatial automation script would break the UIContext but if it works with those two disabled and you haven't modified the scripts, you should open a support case.
------------------------------
Steven Shull
Original Message:
Sent: Thu October 19, 2023 04:45 PM
From: Mathieu Guilmette
Subject: UIContext class version 7.6.1.1 vs 7.6.1.3
Hi,
I finally found what was the issue.
We have spatial installed on these environments and with the latest upgrade, some scripts were added to Maximo.
In my case, both script that ends with "_ASSET" were the reason that the UIContext is null. Don't know why yet. But if I deactivate both of them , it works fine.
Do you think I should open a case to let them know ? I have to deactivate them so a feature won't properly work.
Thank you for you help.

------------------------------
Mathieu Guilmette
Original Message:
Sent: Tue October 17, 2023 01:01 PM
From: Steven Shull
Subject: UIContext class version 7.6.1.1 vs 7.6.1.3
service.webclientsession() calls the same underlying UIContext so it is expected you would get similar results.
After commit is an unusual launch point but as a quick test, I did this in the SR application with the script below and it worked as expected. There were no changes to this class in 7.6.1.3 IFIXes but the version I am running is Tivoli's process automation engine 7.6.1.3-IFIX20230831-1702 Build 20220823-0909 DB Build V7613-344 HFDB Build HF7613-116 (7.6.1.3 IFIX 011). It is possible that another class file was modified that interacts with the UIContext
from psdi.common.context import UIContext
if UIContext.getCurrentContext() is not None:
wcs = service.webclientsession()
wcs.loadDialog("viewhist")
else:
service.error("emx","contextNull")
------------------------------
Steven Shull
Original Message:
Sent: Tue October 17, 2023 12:49 PM
From: Mathieu Guilmette
Subject: UIContext class version 7.6.1.1 vs 7.6.1.3
Hi, our launchpoint is on object save After commit. Nothing special.
I tried using the service.webclientsession() but it also returns nothing.
I will try to make a new script much simpler on a different object to be sure that it's not another script that cause the issue.
------------------------------
Mathieu Guilmette
Original Message:
Sent: Tue October 17, 2023 07:09 AM
From: Steven Shull
Subject: UIContext class version 7.6.1.1 vs 7.6.1.3
What is your launch point causing the automation script to fire? IE is this a push button calling an action launch point automation script or some other event?
I agree with Paul I haven't seen this issue. There was an issue with service.launchDialog in earlier versions that prevented it from working properly but it was fixed in 7.6.1.3 base. We switched it to actually use the loadDialog event that Paul mentions below. But these all depend on the UIContext not being null so if you're seeing it as null, none of them will work.
It may be worth opening a support case. We will not directly support automation scripts but if we're not setting this UIContext in a scenario where it should be set and had been setting before in earlier versions, it's something that might get approved. The decision would be up to L3 and the product manager.
------------------------------
Steven Shull
Original Message:
Sent: Mon October 16, 2023 09:37 AM
From: Mathieu Guilmette
Subject: UIContext class version 7.6.1.1 vs 7.6.1.3
Hi,
I was using the UIContext class in a script in Maximo 7.6.1.1 and it was working fine. We recently upgrade an environment to 7.6.1.3 and since then this part of my script is not working anymore.
context = UIContext.getCurrentContext()if context: wcs = context.getWebClientSession() Utility().sendEvent(WebClientEvent("vdm_prop_motif", wcs.getCurrentPageId(), None, SessionContext(wcs)))
The context is always null. I tried to get the "wcs" by using service.webclientsession() but as I saw in the javaclass, they also use the UIContext.getCurrentContext() so it also returns a null value.
I also tried to launch the dialog using the service.launchDialog("vdm_prop_motif") but nothing happens.
Is there any other way to access the UIContext ? Why it's not working anymore in 7.6.1.3 ?
Thank you
------------------------------
Mathieu Guilmette
------------------------------