Skip to main content

Power of Maximo Formulas - Build logic w/o Custom Java code or Automation Script

Greetings!
Maximo 7.6 has lot of additional capabilities added in Tivoli Automation Engine as compared to older versions of Maximo which aim to allow users to make change in applications for small requirements without actually going to customization route. Automation scripts is one of such tool given for users and technical developers to change the behavior of Maximo in case where functionalities can't be changed only via use of configuration.
If we have a requirement to populate some field on basis of other fields , we can easily do that with automation script but in order to do that you still need to have knowledge of Jython or Javascript to write the logic.
Maximo formula is one the tool given by IBM which can be used for such business requirements and user can make changes to Maximo logic via configuration without getting into difficulties of coding.
Formulas are available from Maximo version 7603. With release of Maximo version 7606, there has been addition of new capabilities into Maximo Formula feature.
Maximo forumulas can be found at Database Configuration and there are 3 related Select Actions-

  • Add/Modify Function
  • Add/Modify Formula for Attributes
  • Add/Modify Formula for Object

We can associate Maximo Formula either with MBO or with any Attribute of MBO.
Maximo has given different functions which can be seen at select action- Add/Modify Formula Function. If user want to write their own logic, custom function can be added there. Logic of calculation for each formula is available into class file associated with each formula.

I will use an example to demo of Maximo Formula to you.
Suppose we have requirement that reorder quantity on reorder should be calculated as 
Reorder Quantity = The maximum number of each item that should be available in stock  – (Available Balance + Quantity on Order)  , rather than being calculated as per OOB logic.
In order to fulfill this requirement, we will generally create an automation script, but this can be done with ease using formula. We can see that formula contains database fields as -
Reorder Quantity = REORDERPAD.REORDERQTY
Maximum number of each item that should be available in stock = INVENTORY.MAXLEVEL
Available Balance =INVENTORY.AVBLBALANCE
Quantity on Order on PO = REORDERPAD.POQTY
Quantity on Order on PR = REORDERPAD.PRQTY

We will create relationship between Inventory and Reorerpad bbject as -
Then we can write a formula on Attribute REORDERQTY as -
NVL(MXCL_INVENTORY$MAXLEVEL,0)-(NVL(MXCL_INVENTORY$AVBLBALANCE,0)+NVL(POQTY,0)+NVL(PRQTY,0))

Value of any field from any other table can be accessed via Relationship.Attrib$tename
 Click on select action - Add/Modify Formula on Attributes - Click new row and add fields where this formula need to be executed- 
after that condition for example - check for site/org if this logic need to be executed only for one org/site and write formula expression as given above.Click OK and now ReorderQty will be calculated via this formula.

Details of other features and other useful formulas can be find at community URL- https://www.ibm.com/developerworks/community/groups/service/html/communityoverview?communityUuid=ad185f90-ca8d-4416-99a6-22fe7f50e4d1

This URL talks about new features added in Maximo7606- https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=2ahUKEwiG3sDFltbcAhWGtI8KHSnbCOgQFjACegQIBRAC&url=https%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Fcommunity%2Fwikis%2Fform%2Fanonymous%2Fapi%2Fwiki%2F02db2a84-fc66-4667-b760-54e495526ec1%2Fpage%2F03ad118c-6040-43dd-bc6d-d7a03510d135%2Fattachment%2F37c2dd71-2dab-4371-a7b6-782fda617bf4%2Fmedia%2FMaximoFormulasV2%2520%25281%2529.pdf&usg=AOvVaw1VzsQN57_fy3eGh7ef6TGy

Comments

  1. Good write-up. Keep it up Prashant! All the best.

    ReplyDelete
  2. Very interesting. I have a requirement to change the reorder calculation (a used in the example) between sites. One site should use the std maximo calculation, the other needs to order up to the max order level. I noticed that the you can add variables (e.g. siteid) to control for which sites a calculation is used, but also noticed that you cannot simply state that "the new calculation should only be used for site X, e.g. siteid=bedford). In this case, the calculation setup seems to prevent the out of the box calculation from happening.
    Any thoughts on how to limit calculation for a single site, without having to recreate already existing calculations?

    Thx, Ruud

    ReplyDelete
  3. Is there a way to use an attribute formula to populate a field with the current user or person?

    Example: we can put the current date in an attribute formula with $sysdate$. Is there an equivalent for username, personid, etc.?

    Thanks!

    ReplyDelete
  4. flexevprod-ji Mary Sanchez click
    landlasider

    ReplyDelete

Post a Comment

Popular posts from this blog

Maximo OSLC Integration with External System- Get data in JSON format

Greetings! If you have noticed recent version of Maximo, couple new application in Integration module has been added which are OSLC Resources and OSLC Provider.These modules gives us ability to integrate with external system in JSON. OSLC is an open community that creates specifications for the integration of products and/or tools.  IBM is a leading contributor to this community and many software products within the IBM Software Group are implementing OSLC in order to enable cross-product integrations. An OSLC integration requires 2 players-  1. OSLC Consumer application 2. OSLC Provider application.   An OSLC provider application makes containers of associated resources(data) available for integration through service providers. Consumer applications then use these service providers to query resources and to create, update, and delete resource data.  The consumer application sends a query to the service provider for resource data. The service provider provides a link

Call publish channel w/o enabling Event Listener in Maximo

Greetings! Generally if we have to send data to external system via MIF, we create Publish Channel and enable Event Listener on publish channel. Once event listener is enabled, Maximo listens for event and send data to end point via publish channel for each Save of related MBO . But t here are many scenarios where we need to send data to external system using publish channel on specific event and not for every save. In order  to send to external system on specific event, for example - sent data to Ariba when PO status in Maximo is changed to APPR, we can use automation script or java code to call publish channel on the go. Below code can be used in automation script - server = MXServer.getMXServer() userInfo = mbo.getUserInfo() whereClause = <CONDITION> server.lookup("MIC").exportData("<Publish Channel Name>", "<External System Name>", whereClause, userInfo, 1000) Via Java class - MXServer server = MXServer.getMXServer();