Original Message:
Sent: Fri May 09, 2025 01:39 AM
From: maximo njsreddy
Subject: Service.error and after-commit automation scripts
Hi Aneesh,
May be you can try : raise TypeError("error message")
------------------------------
[Srikanth][Narala]
[Maximo Specialist]
[Melbourne]
[Australia]
Original Message:
Sent: Thu May 08, 2025 10:56 PM
From: Aneesh Joseph
Subject: Service.error and after-commit automation scripts
Thank you Sankar! I did not know that error messages don't work on after-commit launch points!
------------------------------
Aneesh Joseph
Director and Solutions Architect
objec3d
Melbourne, Australia
https://www.objec3d.com
Original Message:
Sent: Thu May 08, 2025 10:12 PM
From: Sankar Ganesh V S
Subject: Service.error and after-commit automation scripts
Hi Aneesh,
Error message doesn't work with After-commit launch points.
I would suggest using maximo loggers to print the error message in log files.
Automation scripts loggers
Thanks!
------------------------------
Sankar Ganesh V S
Technical Consultant
DXC Technology
Original Message:
Sent: Thu May 08, 2025 08:01 PM
From: Aneesh Joseph
Subject: Service.error and after-commit automation scripts
Hi Maximo Wizards!
I encountered a strange thing. I was updating an automation script that is launched on WORKORDER.save, after commit. The important point here is that it is after commit. I like to use service.error to debug my scripts (because it acts as a breakpoint). However, for this specific scenario, my service.error was never being thrown!
I noticed that service.error messages are never displayed on after-commit launchpoints. If I change the launcpoint to before save, then the error is displayed.
Has anyone encountered this issue before? I assume the error is not displayed because the transaction has already been committed to the database, therefore the error does not stop the object being saved? But I would assume that the error should still be displayed and my script should be stopped, regardless of whether the transaction was committed.
Thanks!
------------------------------
Aneesh Joseph
Director and Solutions Architect
objec3d
Melbourne, Australia
https://www.objec3d.com
------------------------------