Showing posts with label mbo. Show all posts
Showing posts with label mbo. Show all posts

Wednesday, 20 May 2020

Usage of Discardable MBO sets to less utilize the JVM Memory.

The best approach for MboSets , is to make the MboSet "Discardable". This tells Maximo to not place data in the Cache, freeing up memory.


assetMboSet = mbo.getMboSet("ASSET")
assetMboSet.setFlag(MboConstants.DISCARDABLE, true)
curMbo = mbo.moveFirst()
while
        curMbo != None:

curMbo = mbo.moveNext().


You can see above it only take one line of code but can have a big impact on memory usage.

Note: "Discardable" MboSet is always read-only.

If you are struggling with JVM memory availability in your Maximo environment, this is an easy way to help free up some JVM memory.

Friday, 17 January 2020

Copy value while Duplicating an MBO in automation script | IBM Maximo

 
<MBONAME>.DUPLICATE


or example in this case we will name it WORKORDER.DUPLICATE to intercept the duplicate event. The


mbo is this mbo. 
dupmbo is duplicated mbo. 

lets say we want to copy a value from workorder to the new duplicated workorder. 

create a script with this name, 
<MBONAME>.DUPLICATE

in our example we will name it WORKORDER.DUPLICATE to intercept the duplicate event.


dupmbo.setValue("copiedfrom", mbo.getString("wonum"))

Monday, 8 April 2019

Populate GL attribute in All Lines at ONCE from Header | IBM Maximo

Update all lines in Inventory Usage application from header level.

for instance in this example we are using a GL Debit account field on header level, and when we enter values in it; it will be copied into all lines.

To do this we will run a simple automation script using jython:

Attribute Launch Point:

Script: GLDEBIT_INVUSAGE
Langauge: jython

Launch Point:
Object: INVUSE
Attribute: CUXGLDEBIT
Event: Validate

Script Code:
lineSet= mbo.getMboSet('INVUSELINE')
line= lineSet.moveFirst()
while (line):
    line.setValue("GLDEBITACCT",mbo.getString("CUXGLDEBIT"))
    line = lineSet.moveNext()