Maximo

Maximo

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

 View Only
  • 1.  Create custom database function instead of custom java class?

    Posted Sat September 11, 2021 10:04 PM
    Edited by System Admin Wed March 22, 2023 11:52 AM

    I was thinking about an RFE/Idea that I came across recently:


    RFE: New Automation Script Launch Point to Support Roles

    "Maximo automation scripts enable organizations to extend Maximo functionality without downtime and without having to write custom java classes. We'd like to see support added for an automation script launch point in the Roles application to replace custom java classes. Workflows and Communication Templates use roles to determine who should be notified/get assigned. Most of the time, this results in using database relationships to show data related to a record.

    Some situations are more complicated and can't be handled with a SQL where clause. We'd like to be able to handle these situations without needing custom java classes so we can make changes without rebuilding and redeploying the ears."



    Question:


    Are there cases (possibly like the one above) where we might want to create custom database functions -- and use them in the relationship WHERE clauses?
     - If the logic is too complicated/lengthy to put it directly into the relationship WHERE clause, then it might help to put it into a separate function. It might be easier to manage that way.

    Or do WHERE clauses not use real SQL? (native database SQL)

     


    #Maximo
    #AssetandFacilitiesManagement


  • 2.  RE: Create custom database function instead of custom java class?

    Posted Sat September 11, 2021 10:05 PM
    Edited by System Admin Wed March 22, 2023 11:47 AM
    I would think that creating a database function would a lot easier than dealing with custom Java/EARs/downtime. (Assuming the requirement can be done with pure SQL -- hopefully there isn't any functionality needed that's only accessible via Java classes.)

    Or maybe a custom database function wouldn't be needed at all. Maybe it can be done with OOB database functions. I've noticed that Maximo admins tend to use Java and autoscripts, instead of OOB database functionality. But, databases are really powerful and have a ton of under-utilized mechanisms to play with. I'm guessing queries and custom functions can be quite succinct when compared to Java and autoscripts. 

    Note: I'm not talking about circumventing the MIF by editing data, creating db triggers, etc. I'm only talking about querying data. 

    #Maximo
    #AssetandFacilitiesManagement


  • 3.  RE: Create custom database function instead of custom java class?

    Posted Sat September 11, 2021 10:24 PM
    Edited by System Admin Wed March 22, 2023 11:53 AM

    On a side note:

    For those of us who don't have CREATE FUNCTION privileges in the db, Oracle has functionality that lets us put functions right in the WITH clause in a query, without actually creating a function in the database. 

    Functions in the WITH clause

    That could be useful for prototyping a custom function. Once we figure out what we want via the function in the WITH clause, we could then ask the DBA to create the function in the database (still quicker than dealing with EARs).


    #Maximo
    #AssetandFacilitiesManagement