MaxTECH Maximo Technical User Group

Expand all | Collapse all

Handling MOC thru Duplicate MOC

  • 1.  Handling MOC thru Duplicate MOC

    Posted Mon February 03, 2020 01:31 PM
    ​I've come across specific issues in MOC (Oil) what are causing a pain but I suspect that are related to how the Java Class operate and therefore are restricting changing functionality.

    I have deployed the Autoscript PLUSGMOC.DUPLICATE to add some additional functionality.
    Non-Standard Attributes have been added to the Excluded Attributes list in DB Admin on the PLUSGMOC object, however the Autoscript takes care of the standard fields that I don't want to duplicate (Temporary until Date, etc.). The Autoscript also copies the Reviewers & Approvers from mbo to dupmbo.

    However, I have two issues.
    1) the Comments field on the Pre-Start, Post-Start & Closure Actions are not being cleared out. I have tried both setNullValue & setValue but it just gets ignored.
    2) the Classification and workorderspec are also copied. similar to above the values in ALNVALUE at e also copied (which I also have tried setting to null) - these just don't seem to take. I'd be quite happy to not copy classstructureid and therefore any workorderspec records.

    I can't use a save() in the Autoscript because Maximo is going to through the user into the record in the app and expect the user to hit save. If the script does then autokey has not yet been set WONUM and the save fails.

    Any suggestions? I'm guessing this is likely restricted with the java class.

    Simon Barnes
    Principal Consultant
    BPD Zenith
    Calgary, Canada
    07702 638616

  • 2.  RE: Handling MOC thru Duplicate MOC

    Posted Thu February 13, 2020 05:17 PM
    Not sure if you have solved this or not, but we have the following in another plusgmoc.duplicate automation script.

    This automation performs the following functions:
    - Removes pre-start actions from the duplicated record
    - Removes post-start actions from the duplicated record
    - Removes closure actions from the duplicated record
    - Removes review actions from the duplicated record

    If this sounds like it might solve at least some of your issue, let me know and I can send you the automation script.

    Stephen Hume
    Senior Maximo Consultant
    BPD Zenith
    403 464-5779