User1974
User1974

Reputation: 396

Maximo: What is the purpose of MAXVARS?

A PDF about Maximo formulas mentions MAXVARS:

Maximo Formulas are the logical next step in Maximo customization after Maximo Scripting. Maximo formulas follow Excel-like grammar to define expressions that use input from variables to calculate a value. Unlike scripting, where most of the variables need to get predefined and bound to some Maximo attributes/properties/MAXVARS, the formula expression can use any of those Maximo attributes/properties/MAXVARS inside the expression without ever needing to predefine or bind them.

I assume that MAXVARS are some sort of global variable.

But when I search the docs, I don't see anything that explains them in detail.

What are MAXVARS and how are they used?

Upvotes: 3

Views: 2166

Answers (3)

Maximo.Wiki
Maximo.Wiki

Reputation: 631

MaxVars Variables

As others have mentioned previously, MAXVARS has its origins in early versions of Maximo (e.g. 3.x, 4.x) prior to it becoming a Java application and prior to multitenancy so initially all MAXVARS values applied at the System level as there were no Organisations and Sites in the system. I don't recall specifically which version introduced MaxVars entries with ORG and SITE scope in addition to SYSTEM but those are available in Maximo 7.6.x.

The following explains how to query the maxvartype database table for an explanation of what each of the entries in the maxvars table does:

https://www.ibm.com/support/pages/checking-purpose-maxvars-variables

https://developer.ibm.com/static/site-id/155/maximodev/7609/maximocore/businessobjects/psdi/app/system/MaxVars.html

Usage

One example is the MaxVars values that are used for Inventory. Each Organisation in the system has 6 MaxVars entries:

  • A_BREAKPOINT : 0.8
  • B_BREAKPOINT : 0.15
  • C_BREAKPOINT : 0.05
  • A_CCF : 30
  • B_CCF : 60
  • C_CCF : 90

The first 3 values dictate what percentage of type A, B and C inventory items make up the items being cycle counted for the organisation. The latter 3 values dicate the cycle count frequency for type A, B and C inventory items in days. In short the MaxVars entries allow some flexibility in the Cycle Count functionality rather than hard-coding these values. More details of these specific MaxVars entries are provided here:

https://developer.ibm.com/static/site-id/155/maximodev/7609/maximocore/businessobjects/psdi/app/inventory/Inventory.html

System Properties

System properties were introduced later but perform a similar role with a list of property names and values. System properties apply to either the instance or globally to all instances using the same database server. An added benefit of System Properties over MaxVars variables is that some system properties can be live-refreshed and the new property value is used immediatley rather than for example having to restart the application server.

Usage

One common example is the property name mxe.adminmode.logoutmin which records the number of minutes users have to log out before Admin Mode is enabled. This is usually modified in Database Configuration from More Actions -> Manage Admin Mode. Before enabling Admin Mode you can edit the "Number of Minutes for User Logout" and click the "Update Properties" to update the mxe.adminmode.logoutmin property value in System Properties.

https://www.ibm.com/support/knowledgecenter/en/SSLKT6_7.6.0/com.ibm.mbs.doc/propmaint/r_ctr_sysprops_overview.html

https://developer.ibm.com/static/site-id/155/maximodev/7609/maximocore/businessobjects/index.html?index-all.html

Why Are There Two Methods For Largely The Same Functionality?

I would guess that there is probably a lot of legacy code that still references the MaxVars variables rather than the newer System Properties and refactoring the code to use System Properties instead may not be a high priority but it's possible MaxVars may be phased out over time.

Maximo Customisation

When creating Maximo customisations either MaxVars variables or System Properties can be useful (with a preference to the latter) in order to avoid hard-coding values to provide reusability and flexibility. For example say you have a workflow that routes purchase orders over a particular value to the CEO for approval. Rather than hard-code the currency value in the workflow you could create a custom system property to store the threshold value amount and use a custom condition automation script to compare the PO total cost to the system property value and return a true or false accordingly. Therefore if the value threshold for CEO approval changes in future you only need modify the system property not the workflow.

Formulas

Whilst the link to the pdf in your question no longer works so I haven't viewed that document, from the excerpt you provided I would expect System Properties and MaxVars variables to be used in formulas in a similar fashion, to avoid hardcoding a value which would require us to modify the formula if it changes in future when a property can be used instead.

Upvotes: 4

SlightlyCrazy
SlightlyCrazy

Reputation: 111

MAXVARS is a database table which identifies a number of system properties within the MAXIMO environment. Its a hang over from older versions and was around in version 3 as I remember (current version is 7.6).

Some MAXVARS entries can be amended through the MAXIMO UI (e.g. Organisations application - PM Options), others have to be amended through appropriate SQL (e.g. if Admin Mode becomes stuck you need to update the relevant MAXVARS entry via a SQL update)

New System values are now defined as 'system properties' (defined within MAXPROP and MAXPROPVALUE tables), and are visible and can be amended within the System Properties application.

:)

Upvotes: 2

Dex
Dex

Reputation: 1271

Generally, they are system level configuration elements. They are used in special cases in the code to determine how the system should behave. It contains things like whether Admin Mode is on for the system, or whether to automatically close completed POs when an invoice comes in, or what status to put a work order in when assignments are completed. It's nature is really just a generic key-value pairing table at the ORG level, so it can be used for any kind of system variable one might want to store, though generally there isn't much of a use-case for it in customizations.

Upvotes: 5

Related Questions