Maximo Open Forum

 View Only
Expand all | Collapse all

Using the changeStatus method of workorder to batch cancel work orders may result in some data being unable to change its status

  • 1.  Using the changeStatus method of workorder to batch cancel work orders may result in some data being unable to change its status

    Posted 11 days ago

    List the work order data that needs to be cancelled in the dialog. When executing the above code, the first two data were successfully executed normally, and the status of the following data was not updated correctly. However, changeStatus has been executed correctly and the output statement is also normal. When saving, it was not saved properly


    #Administration
    #Analytics
    #Architecture
    #Assets
    #CivilInfrastructure
    #Customizations
    #EndUser
    #EverythingMaximo
    #HSE/OilandGas
    #Infrastructure
    #Integrations
    #Inventory
    #IoT
    #LifeScience/Calibration
    #Linear
    #MaximoApplicationSuite
    #MaximoForAviation
    #MaximoUserGroups
    #Mobility
    #Nuclear
    #Procurement
    #Reporting
    #Scheduling
    #Security
    #ServiceProvider
    #Spatial
    #Transportation
    #Utilities
    #WorkCenters
    #WorkManagement
    #MaximoVisualInspection
    #Predict
    #Monitor
    #Health
    #Assist
    #Safety

    ------------------------------
    Ethan Williams
    secrecy
    ------------------------------

    Attachment(s)

    xlsx
    workorder.xlsx   9 KB 1 version
    txt
    batchCancelWOBean.txt   859 B 1 version
    txt
    dialog.txt   1 KB 1 version


  • 2.  RE: Using the changeStatus method of workorder to batch cancel work orders may result in some data being unable to change its status

    Posted 7 days ago

    I know this is just a snippet of the overall code but be aware that canChangeStatus throws an exception when it's not allowed. Since you're not catching the exception, you'll stop the code if a status change on one of the records is not allowed. 

    Also, there is a bug on some versions (including 7.6.1.3) where changing the status to CAN fails on some work orders due to Known Issue: DT434796

    You should also be calling save via the data bean (IE this.save()) rather than getting and saving the set. There's some additional handling in the framework in the data bean that you likely don't want to bypass. 



    ------------------------------
    Steven Shull
    Naviam
    ------------------------------



  • 3.  RE: Using the changeStatus method of workorder to batch cancel work orders may result in some data being unable to change its status

    Posted 5 days ago

    If I need to update the status of some sub work orders to cancel, do I need to call the changeStatus method and set the PARANTCHGSSTATUS field to false



    ------------------------------
    Ethan Williams
    secrecy
    ------------------------------