jythonmaximo

How to skip script triggering while executing Application Import in Maximo?


While importing a csv file, a script that checks for additions/changes is triggered.

How can I skip this triggering? Or, how can I detect the Application import in my script to stop execution?


Solution

  • You could check whether interactive is true. For an Application Import, it will be false, like it is for all integration.

    Alternatively, you could include an indicator in your data. For example, many objects have a SENDERSYSID attribute that you could set to IMPORT. Your script could then be adjusted to only do its job where sendersysid is null or sendersysid != 'IMPORT'.

    To "include the indicator in your data", you will need to ensure the Object Structure you are importing against Includes, or doesn't Exclude, the attribute into which you will load your indicator. You then need to include that attribute in your data load with the value you use to indicate this record came from a data load.

    For example, imagine you were loading work orders with an Object Structure called MXWODETAIL, and you were going to set SENDERSYSID to IMPORT. First, you would change your script to not do its processing when SENDERSYSID is set to IMPORT. Next, you would go to the MXWODETAIL Object Structure, load the Exclude/Include Attributes dialog and make sure SENDERSYSID does not have Exclude checked. Then, you would add the indicator to your data, like this:

    SITEID,WONUM,DESCRIPTION,SENDERSYSID
    BEDFORD,1010,"Your work order description",IMPORT
    

    Now, when you load this data, your script will see your indicator and not do its processing.