Maximo

Maximo

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

 View Only
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 System Admin Wed March 22, 2023 11:56 AM
    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?
    #Maximo
    #AssetandFacilitiesManagement


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

    Posted Tue July 27, 2021 03:51 PM
    Edited by System Admin Wed March 22, 2023 11:53 AM
    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.

    #AssetandFacilitiesManagement
    #Maximo


  • 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 Tue September 14, 2021 03:24 PM
    Edited by System Admin Wed March 22, 2023 11:46 AM
    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 -- avoiding the need for an automation script?


    #Maximo
    #AssetandFacilitiesManagement


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

    Posted Wed September 15, 2021 08:18 AM
    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 Wed September 15, 2021 02:23 PM
    Edited by System Admin Wed March 22, 2023 11:46 AM

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

    1. MxLoader
       - Would :&APPNAME& resolve to NULL ?
    2. Application Import
       - Would :&APPNAME& resolve to ASSETCAT, as expected/desired ?




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

    Posted Wed September 15, 2021 02:49 PM
    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 Wed September 15, 2021 02:55 PM
    Edited by System Admin Wed March 22, 2023 11:52 AM
    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


    Edit:

    The above technique worked. Adding OR :&APPNAME& IS NULL to the condition allowed MxLoader to load deactivated classifications...because the APPNAME for MxLoader was NULL.


    #Maximo
    #AssetandFacilitiesManagement


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

    Posted Wed September 15, 2021 03:14 PM
    Edited by System Admin Wed March 22, 2023 11:47 AM

    FYI - I created an RFE:

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

    #Maximo
    #AssetandFacilitiesManagement


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

    Posted Fri September 24, 2021 11:10 AM

    Hi Steven,

    Regarding this blurb:

    "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."

    Is UserInfo a database table? If so, would there be a way to get the "is interactive" information about a user session from it -- by using a relationship in a conditional expression?




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

    Posted Fri September 24, 2021 11:39 AM
    No, UserInfo is a class that gets instantiated for tracking a lot of metadata that Maximo needs at a user level (https://bportaluri.com/wp-content/MaximoJavaDocs76/com/ibm/tivoli/imi/controller/UserInfo.html). This is used when you open an MboSet to tie that MboSet to your user session but it's also used for getting access to things like your default insert site, time zone information, database connection key, etc.

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