APAR status
Closed as program error.
Error description
PROBLEM: Automation script fails completely with no errors. The script is supposed to display a yes/cancel dialog when changing the PO description. PERFORMANCE ISSUE: NO STEPS TO REPRODUCE: Create two messages in the database configuration: group: slcfinance key: nopoattachments message suffix: I message id: BMXZZ7120I Value: Continue with Approval? buttons: OK, CANCEL group: slcfinance key: usercancel message suffix: E message id: BMXZZ7121E Value: User Cancelled buttons: OK Steps to create the script: 1.) Go to the automation script application Create --> Script with Object Launch Point Object: PO Event: Save Before Save on Add and Update Script Language: JavaScript Script: importClass(Pa ckages.psdi.mbo.MboRemote); importClass(Packages.psdi.mbo.MboCon stants); importClass(Packages.psdi.mbo.MboSetRemote); importClas s(Packages.com.ibm.tivoli.maximo.script.ScriptService); importCl ass(Packages.psdi.util.MXApplicationException); importClass(Pack ages.psdi.server.MXServer); importClass(Packages.psdi.iface.mic. InvokeChannelCache); importClass(Packages.psdi.mbo.GLFormat); va r attTest = processAnyAttachments(mbo); function queryuser(mbo) { service.log(scriptName + ".JS - entering queryuser(mbo)"); service.log(scriptName + ".JS - service.YNC_NULL = " + service.YNC_NULL + ", service.YNC_NO = " + service.YNC_NO + ", service.YNC_YES = " + service.YNC_YES + ", service.YNC_CANCEL = " + service.YNC_CANCEL); service.log(scriptName + ".JS - service = " + service); var answer = service.yncuserinput(); if (answer == service.YNC_NULL) { service.yncerror("slcfinance", "nopoattachments"); } if (answer == service.YNC_CANCEL) { service.log(scriptName + ".JS - answer == service.YNC_NO"); service.error("slcfinance", "usercancel"); } service.log(scriptName + ".JS - leaving queryuser(mbo)"); } function processAnyAttachments(mbo) { if (interactive) { queryuser(mbo); } } Steps to test the script: 1.) Navigate to the PO object and bring up a PO where you can change the description 2.) Change the description and click Save 3.) The save does not trigger a YNC dialog to come up - The YNC dialog should be displayed when the PO is saved RESULTS: The save does not trigger a YNC dialog to come up EXPECTED RESULT: The YNC dialog should be displayed when the PO is saved CAUSE: Key statement is nashorn prevents calling the service YNC constants, therefore their values need to be declared directly in the script: ... var YNC_NULL = -1; var YNC_OK = 2; var YNC_CANCEL = 4; var YNC_YES = 8; var YNC_NO = 16; ... instead of: if (answer == (service.YNC_NULL)) should reference just be: if (answer == YNC_NULL) ... PRODUCT VERSION: Tivoli's process automation engine 7.6.1.1
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * * Automation scripting users who write and run js automation * * scripts that throw YNC dialogs. * **************************************************************** * PROBLEM DESCRIPTION: * * The runtime exception is not caught which causes YNC and * * other dialogs to not be displayed when script is fired. * **************************************************************** * RECOMMENDATION: * ****************************************************************
Problem conclusion
This is fixed in code. The fix for this APAR is contained in the following maintenance package: | release\fix pack | Interim Fix for Release 7.6.1.3 Product
Temporary fix
Comments
APAR Information
APAR number
IJ27340
Reported component name
MAXIMO ASST MGM
Reported component ID
5724R46AM
Reported release
761
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2020-08-28
Closed date
2020-10-26
Last modified date
2020-10-26
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
MAXIMO ASST MGM
Fixed component ID
5724R46AM
Applicable component levels
[{"Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"761"}]
Document Information
Modified date:
27 October 2020