Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Invoke formulas from background

    Posted 01/05/23 12:36 PM
    Hi, 

    I have created an attribute formula and it works only when the application that has the object mapped to the formula is launched, I assume that only when the mbo is initialized the formula is triggered. Is there a way to invoke these formulas from automation scripts? 

    For example the formula will calculate the count of work orders that are completed along with some other condition and store it in a custom attribute in ASSET object. When I complete the work order then I expect the count to be incremented in the ASSET table however that does not happen unless the ASSET application is not launched in the UI. Based on the count we need to populate the values in some other attributes in ASSET table which does not work since the count is not updated on work order completion in ASSET object. Is there a way to trigger the formula without launching the Assets application in UI?

    ------------------------------
    MAX092012
    ------------------------------

    #AssetandFacilitiesManagement
    #Maximo


  • 2.  RE: Invoke formulas from background

    Posted 01/06/23 09:01 AM
    Is the attribute on ASSET that the formula is tied to persistent or non-persistent? If the attribute is persistent, it's evaluated on save of the record which requires some change to the ASSET record. In most cases, saving a WO will not trigger an update to an asset. If it's non-persistent it's on initialize of the attribute. If you're displaying the attribute in the WOTRACK application and it's non-persistent, I would expect it to recalculate after save because the MBOs are re-initialized.

    ------------------------------
    Steven Shull
    ------------------------------



  • 3.  RE: Invoke formulas from background

    Posted 01/06/23 09:29 AM
    Hi Steven,
    Thank you for your reply! The non-persistent attribute is in ASSET object, and they are not visible in the WOTRACK application as they are not needed. I have an automation script on WORKORDER object save and the expectation is that this formula should be triggered as I'm trying to set some values in ASSET object based on these non-persistent attribute values however  the results are incorrect since the formula is not getting triggered because the Asset MBO is not initialized. I tried to initialize the ASSET Object within my automation script (tied to WORKORDER object) by explicitly invoking init() method however it didn't work.

    ------------------------------
    MAX092012
    ------------------------------



  • 4.  RE: Invoke formulas from background

    Posted 01/10/23 09:11 AM
    Hi,

    The attribute should go through the init logic as soon as anything request it (ie mbo.getInt("attribute")).  So, there seems to be more to the story here.  Can you provide more details around the set up of this formula?

    Steve

    ------------------------------
    Steve Hauptman
    ------------------------------