Maximo

Expand all | Collapse all

Condition/Global data restriction: Apply to multiple, specific applications

  • 1.  Condition/Global data restriction: Apply to multiple, specific applications

    Posted Tue July 27, 2021 03:49 PM
    Edited by User1971 8 days ago
    MAM 7.6.1.2:

    I'm attempting to implement a solution that will hide inactive classifications from users.

    Scenario:
    I have a global data restriction and a conditional expression that hide inactive classifications:



    When it comes to the global data restriction, it looks like I can either:
     A. Leave the Application field blank -- the global data restriction will apply to all applications in Maximo.
     Or B., enter a specific application name.


    Question:

    I want the data restriction to apply to all applications -- except for the Classifications application (ASSETCAT). Reason: I still want to see the deactivated classifications in the Classifications application -- so that I can refer to them in the future, re-activate them if needed, etc..

    Is there a way to do that -- apply the condition/restriction to all applications except ASSETCAT?
    If so, that would avoid the need to create individual global data restrictions for the ~10 applications that use classifications.



    Related post:
    Deactivate classifications?


  • 2.  RE: Condition/Global data restriction: Apply to multiple, specific applications

    Posted Tue July 27, 2021 03:51 PM
    Edited by User1971 8 days ago
    I think I can use the APPNAME bind variable for this. It just took me a while to get the logic right.

    :cgACTIVE = 1 
    OR :&APPNAME& = 'ASSETCAT'

    In the global data restriction, I would leave the Application field blank.



    In order for a classification record to show up in Maximo applications, the following must be true:
     - The classification must be active (WOTRACK, JOBPLAN, etc. would only show active classifications)
     - Or, in the case where we're using the Classifications application, show all classification records, regardless of status.


  • 3.  RE: Condition/Global data restriction: Apply to multiple, specific applications

    Posted Wed July 28, 2021 08:30 AM
    Just some general feedback, be careful hiding core data like this as it isn't always clear what might break. For example, if you make a classification inactive that's referenced on an active WO, could something go wrong? I'm not aware of anything specifically, but as an example, there's the ability to queue up changes to specs on completion of a WO (in the Move/Swap/Modify dialog and saving as a plan). It's possible this might not work properly if it can't find the classification record. It's also an edge case most people aren't familiar with as it isn't used very commonly.

    Sometimes we've also found it advantageous to do from a custom condition automation script to ensure other scenarios (such as dataloads) are allowed by checking whether it's an interactive session. I could see the desire to load those in an INACTIVE state which would be a problem because the app name wouldn't be ASSETCAT and thus hidden from the user.

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



  • 4.  RE: Condition/Global data restriction: Apply to multiple, specific applications

    Posted 8 days ago
    Edited by User1971 7 days ago
    A follow-up question about this line:
    "Sometimes we've also found it advantageous to do from a custom condition automation script to ensure other scenarios (such as dataloads) are allowed by checking whether it's an interactive session."

    Would it be worth asking IBM for a new bind variable for interactive sessions: &INTERACT& ? Would that help us in this scenario -- would that allow us to avoid the need for an automation script?



  • 5.  RE: Condition/Global data restriction: Apply to multiple, specific applications

    Posted 8 days ago
    I'm not sure what team manages those bind variables and haven't seen one added but I can't think of a reason they couldn't do it. And eliminating an automation script event would be nice. UserInfo tracks whether or not a session is interactive and they should be able to evaluate it in context of a condition without too much effort as the MBO will have the UserInfo associated to it.

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



  • 6.  RE: Condition/Global data restriction: Apply to multiple, specific applications

    Posted 7 days ago
    Edited by User1971 7 days ago

    I wonder what the :&APPNAME& bind variable (in the global data restriction) would resolve to when using these mechanisms to load classifications:

    1. MxLoader -- I think it uses the REST API?
       - Would :&APPNAME& resolve to NULL ?
    2. Application Import -- the action is within the Classifications application.
       - Would :&APPNAME& resolve to ASSETCAT, as expected/desired ?




  • 7.  RE: Condition/Global data restriction: Apply to multiple, specific applications

    Posted 7 days ago
    Yes :&APPNAME& can resolve to null and would be null for the MXLoader scenario. Standard integrations (external systems for example) would also resolve to null. In regards to Application Import specifically, I've never looked and don't know. I'd assume it would also resolve to null but they may have added logic for it to represent the app.

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



  • 8.  RE: Condition/Global data restriction: Apply to multiple, specific applications

    Posted 7 days ago
    Edited by User1971 7 days ago
    Thanks.

    I suppose I could change my global data restriction's condition so that it would work with MxLoader:

    Before:
    :cgACTIVE = 1
    OR :&APPNAME& = 'ASSETCAT'

    After:
    :cgACTIVE = 1
    OR :&APPNAME& = 'ASSETCAT'
    OR :&APPNAME& IS NULL




  • 9.  RE: Condition/Global data restriction: Apply to multiple, specific applications

    Posted 7 days ago
    Edited by User1971 7 days ago

    FYI - I created an RFE:

    Bind variable for "Is Interactive?"
    https://ibm-ai-apps.ideas.ibm.com/ideas/MASM-I-557