Maximo Open Forum

 View Only
  • 1.  Automation Script appears to not be running

    Posted 05-06-2021 11:21

    We are a new support team to Maximo.  It appears that we have an active automation script that is not working. We want to make sure that an item number is active.  It appears that a tech person can manually type in an inactive item number and submit. Any suggestions would be greatly appreciated.



    load("nashorn:mozilla_compat.js");

    importClass(Packages.psdi.server.MXServer);



    if (mbo != null && !mbo.isNull("ITEMNUM"))

    {

    if (!mbo.getString("ITEM.ITEMTYPE").equalsIgnoreCase("ITEM") && !mbo.getString("ITEM.ITEMTYPE").equalsIgnoreCase("SPECIALORDER"))

    {

    errorgroup = "mr";

    errorkey = "itemnum";

    }

    }


    #Administration

    ------------------------------
    Jennifer Romeiser
    Carilion Clnic
    ------------------------------


  • 2.  RE: Automation Script appears to not be running

    Posted 05-06-2021 12:10
    Forgot to mention that in our Dev Environment we are at version 7.6.1.0 with Ifix 004  and implemented ifix 023. It is working in our current Prod environment.

    ------------------------------
    Jennifer Romeiser
    Carilion Clnic
    ------------------------------



  • 3.  RE: Automation Script appears to not be running

    Posted 05-06-2021 15:04
    Hi Jennifer,

    What is the launch point for this automation script? Is it giving you an error in the log?

    You can enable logs with the help of this article: https://www.ibm.com/support/pages/automation-scripts-logging

    Thank you,
    Megha

    ------------------------------
    Megha Tatiya
    ------------------------------



  • 4.  RE: Automation Script appears to not be running

    Posted 05-07-2021 08:59
    Jennifer,

    It appears this script is enforcing a rule that Tool items cannot be used in this context. The script is not performing a status check on the item.

    You can do something like:

    mbo.getString("STATUS") == "ACTIVE"

    ... to check if an item is active.

    Hope this helps,
    Alex

    ------------------------------
    Alex Walter
    A3J Group, LLC
    ------------------------------



  • 5.  RE: Automation Script appears to not be running

    Posted 05-07-2021 10:55
    Hi Jennifer,

    I'm using Maximo 7.6.0.8, and when I create a Materials Requisition using the Create Requisition application, if I manually enter an ITEMNUM that has an Item Status = OBSOLETE, I get the red X error in the field. If I use the Lookup, OBSOLETE items aren't even in the list.  I can still use Item Numbers where the Item is in PENDOBS status.  Is this the behavior you see in your system? Are your users using the OOTB Create Requisition application?  Were there modifications to the field used on that form, or to the Lookup? Maybe this is a bug in your version of the software?

    To make sure the script is actually running:
    1) Make sure your system is not in Admin Mode.  Check the Database Configuration application, Manage Admin Mode action.  If you click that, the dialog box should prompt you to Turn Admin Mode ON, meaning it's currently OFF.
    2) In the Automation Script, make sure the Active box is checked on the main tab, AND look at the Launch Points tab to make sure the Active box is checked for the Launch Point.

    Please confirm that SPECIALORDER is a value that was added to the Alphanumeric Domain ITEMTYPE.  That's not an OOTB value, and normally that's something I would think of in terms of Inventory, not Item.

    While on that thought. . .the logic you're trying to build into your script, are you trying to prevent users from entering "invalid" ITEMS or "invalid" parts not in stock.  Ultimately, I don't understand why you're having to script something to rule out ITEMS because the application should already do that.  If you're trying to filter out certain things based on how those Items exist or don't exist in INVENTORY, that's a different story.

    ------------------------------
    Travis Herron
    Pensacola Christian College
    ------------------------------