Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Service.error and after-commit automation scripts

    Posted Thu May 08, 2025 08:02 PM

    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
    ------------------------------


  • 2.  RE: Service.error and after-commit automation scripts

    Posted Thu May 08, 2025 10:13 PM

    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
    ------------------------------



  • 3.  RE: Service.error and after-commit automation scripts

    Posted Thu May 08, 2025 10:57 PM

    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
    ------------------------------



  • 4.  RE: Service.error and after-commit automation scripts

    Posted Fri May 09, 2025 01:40 AM

    Hi Aneesh,

    May be you can try : raise TypeError("error message")



    ------------------------------
    [Srikanth][Narala]
    [Maximo Specialist]
    [Melbourne]
    [Australia]
    ------------------------------



  • 5.  RE: Service.error and after-commit automation scripts

    Posted Fri May 09, 2025 02:56 AM

    Thank you Srikanth!



    ------------------------------
    Aneesh Joseph
    Director and Solutions Architect
    objec3d
    Melbourne, Australia
    https://www.objec3d.com
    ------------------------------