Maximo Integration

  • 1.  Autoscript Implicit Variable Missing?

    Posted Fri May 29, 2020 10:38 AM
    Edited by Robert Goff Fri May 29, 2020 04:41 PM
    According to https://www.ibm.com/support/knowledgecenter/SSLKT6_7.6.0/com.ibm.mt.doc/autoscript/r_variables_automation_scripts.html

    Table 2. Implicit variables that are used with a primary variable in automation scripts
    Implicit variable Type Scope Description
    var_internal The same type as the MBO attribute that the variable binds to. All launch points Provides the internal value for an SYNONYMDOMAIN entry. If the primary variable is associated with a MBO attribute that is associated with a synonym domain, the var_internal implicit variable provides the corresponding internal value for the attribute. The var_internal variable is passed to the script. The script cannot modify the var_internal variable.
    There should be an implicit variable for a variable bound to a domain-based attribute that returns the synonym internal value, but I haven't been able to find it. Can anyone give me an example of how this works? Thanks.

    Edit: Actually, what I can't find specifically is status_internal for WORKORDER; I did find the _internal variable for other domain-connected attributes.

    ------------------------------
    Robert Goff
    ------------------------------


  • 2.  RE: Autoscript Implicit Variable Missing?

    Posted Mon June 01, 2020 09:29 AM
    This is based on an automation script variable being declared and being bound to an attribute based on synonymdomain. I did a quick test with a launch point on WORKORDER SAVE and confirmed that if I setup a variable (status in this case) and bound that variable to the STATUS attribute that when I referenced status_internal I got the internal value. It's possible there are issues with certain launch points (if so please let me know what your launch point is and I'll try it out).

    Somewhat annoyingly, if you have a script launch point on an attribute, there are a few special variables that you can access but none that return the internal value. For example, there is an attributename_initial or attributename_previous, or you can use things like thisvalue_readonly or thisvalue_required to adjust the edit rules. 

    We don't typically use variables, and it's a little verbose, but it's not too bad to get the internal value just using code. Especially in the case of status because stateful mbos like WORKORDER have a function called getInternalStatus() so you can call mbo.getInternalStatus() and get the internal value.

    ------------------------------
    Steven Shull
    Director of Development
    Projetech Inc
    Cincinnati OH
    ------------------------------



  • 3.  RE: Autoscript Implicit Variable Missing?

    Posted Tue June 02, 2020 10:34 AM
    Interesting; that's exactly what didn't work for me. I'll set up a more isolated test case and see what happens.

    ------------------------------
    Robert Goff
    ------------------------------



  • 4.  RE: Autoscript Implicit Variable Missing?

    Posted Mon June 01, 2020 10:34 AM
    All you need to do is
    1. define a binding var of type ATTRIBUTE for that script/launch point and associate that to the mbo attribute in question
    2. if the var name is x - you can now access x_internal inside the script and that will have the internal "maxvalue" of the corresponding attribute value.

    ------------------------------
    Anamitra Bhattacharyya
    IBM
    Littleton MA
    ------------------------------