Troubleshooting
Problem
This document provides some info about working with non-persistent objects and automation scripts.
Symptom
Automation Scripts not working for some non-persistent objects, such as ASCHANGESTATUS or USERSTATUSCHANGE
1. Steps to replicate:
Create an object level automation script using the following
Object Level Launch Point
Launch Point = OBJ-ASSET-STATUS
Description = Object Asset Status History
Object = ASCHANGESTATUS
Active = Y
Add = Y
update = Y
Initialize = N
Delete = N
No required variables.
Script = OBJ-ASSET-STATUS-SCRIPT
Description = Object asset status history
Log Level = DEBUG
Status = Active
language = jython
Script should be like below :
from psdi.util.logging import MXLogger
from psdi.util.logging import MXLoggerFactory
from psdi.mbo import MboConstants
from java.util import Date
logger = MXLoggerFactory.getLogger("maximo.script");
logger.debug("==OBJ-ASSET-STATUS-SCRIPT." + launchPoint + ": START ==")
assetnum = mbo.getOwner().getString("assetnum");
logger.debug("==OBJ-ASSET-MSM-SCRIPT.assetnum=="+ assetnum)
logger.debug("==OBJ-ASSET-STATUS-SCRIPT." + launchPoint + ": END ==")
After going to Logging app and making sure that the script logger is set to DEBUG, you will observe that there is no log file messages getting generated with assetnum value, in the log files.
NOTE : This was tested with persistent object called PERSON and it works.
But not for non-persistent object, such as ASCHANGESTATUS or USERSTATUSCHANGE.
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21967449