Item number expressions

Define item numbers for computers based on the way that your enterprise implements asset management.

The mapping expression returns the item numbers (itemnum) for computers. The expression must contain the item numbers that you create in the Maximo® database for your enterprise, based on the way that you manage computer assets.

In this example, item numbers are based on the system role attribute from the source.

Sample expression for itemnum property in the Expression Builder dialog box

{
String itemnum = 'Deployed Asset.Systemrole';
if(!isNull(itemnum))
{
if(itemnum.equalsIgnoreCase("DESKTOP") || itemnum.equalsIgnoreCase("Network PC") ||
itemnum.equalsIgnoreCase("Standalone PC") || itemnum.equalsIgnoreCase("PC") ||
itemnum.equalsIgnoreCase("ComputerSystem"))
{
itemnum = getProperty("assetinit.properties", "assetinit_systemrole_item_computer");
} else if(itemnum.equalsIgnoreCase("Network Portable") || itemnum.equalsIgnoreCase("Standalone Portable") ||
itemnum.equalsIgnoreCase("NOTEBOOK")){
itemnum = getProperty("assetinit.properties", "assetinit_systemrole_item_portable");
} else if (itemnum.equalsIgnoreCase("LAPTOP")){
itemnum = getProperty("assetinit.properties", "assetinit_systemrole_item_laptop");
} else if(itemnum.equalsIgnoreCase("Server") || itemnum.equalsIgnoreCase("Windows 2003 Server") ||
itemnum.equalsIgnoreCase("PowerEdge 500C Server")){
itemnum = getProperty("assetinit.properties", "assetinit_systemrole_item_server");
} else if (itemnum.equalsIgnoreCase("Unix Server") ){
itemnum = getProperty("assetinit.properties", "assetinit_systemrole_item_unixserver");
} else {
LogManager.logInfo("skipCurrentInstance()- Computer.itemnum, the Deployed Asset.Systemrole <" +itemnum +"> is not
mapped to itemnum ");
skipCurrentInstance();
}
}
else
{
LogManager.logInfo("skipCurrentInstance()- Computer.itemnum, the Deployed Asset.Systemrole is null ");
skipCurrentInstance();
}
return(itemnum);
}


Feedback