IBM Support

Creating an object structure for importing work assets to an existing data sheet

Technical Blog Post


Abstract

Creating an object structure for importing work assets to an existing data sheet

Body

In the following example, I will show you how you can create a simple object structure to import multiple work assets to an existing data sheet.

The Data Sheet Template application is installed with the installation of the Calibration offering.

1.  Navigate to the object structure application and create a new object structure.

Here is my object structure:

Parent:
PLUSDSPLAN

Child:
PLUSDSPLAN/PLUSCDSASSETLINK

The processing order for the parent and child above is set to 1.


The relationship I used is:
PLUSCDSASSETSLINK
 

Remember if using flat file structure for your import that you eliminate any duplication aliases prior to proceeding.

2.  Navigate to database configuration, and bring up the PLUSCDSASSETLINK object.  From the select action menu, select "Restrict Attributes".  Search for the DSASSETLINKID attribute, and then check the "Restricted" check box.  This ensures that the link id value is auto-numbered using the default sequence for each new work asset added to the data sheet.  Apply the changes and configure the database.

3.  Create an enterprise service (and publish channel if you desired) to use the integration framework to import the data, and assign them to an external system.

If you wish to simply use application import and export, you can use this document for reference to enable the Data Sheet Template application to use this method.

/support/pages/node/428299

4.  Now you can create your XML or flat file to import the work assets for a particular data sheet.

The example XML data below was used in this example to import two work assets (asset numbers T2003 and 12710) to the existing data sheet DS101:

<?xml version="1.0" encoding="UTF-8"?>
<SyncBFPLUSDSPLAN xmlns="http://www.ibm.com/maximo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creationDateTime="2015-04-21T10:13:02-04:00" transLanguage="EN" baseLanguage="EN" messageID="142962558250575920" maximoVersion="7 5 20140411-2000 V7511--1">
  <BFPLUSDSPLANSet>
    <PLUSDSPLAN>
      <CHANGEBY>WILSON</CHANGEBY>
      <CHANGEDATE>2011-02-15T14:04:51-05:00</CHANGEDATE>
      <CONFIDLEVEL xsi:nil="true" />
      <DESCRIPTION>PG100300420EU</DESCRIPTION>
      <DSPLANNUM>DS101</DSPLANNUM>
      <GBMETHOD />
      <GUARDBAND />
      <HISTORYFLAG>0</HISTORYFLAG>
      <KFACTOR xsi:nil="true" />
      <ORGID />
      <PLUSDSPLANID>1</PLUSDSPLANID>
      <REVCOMMENTS />
      <REVISIONNUM>0</REVISIONNUM>
      <SITEID />
      <STATUS maxvalue="APPR">APPR</STATUS>
      <STATUSDATE>2011-02-15T14:04:46-05:00</STATUSDATE>
      <SYSTEMID />
      <SYSTEMIDDESC />
      <UNCERTFREQ xsi:nil="true" />
      <UNCERTUNITS />
      <VIEWASLOOP>0</VIEWASLOOP>
      <PLUSCDSASSETLINK>
        <ASSETNUM>T2009</ASSETNUM>
        <DSASSETSLINKID>1002</DSASSETSLINKID>
        <ITEMNUM />
        <LOCATION />
        <ORGID>EAGLENA</ORGID>
        <PLUSCDSASSETLINKID>63</PLUSCDSASSETLINKID>
        <SITEID>FLEET</SITEID>
      </PLUSCDSASSETLINK>
      <PLUSCDSASSETLINK>
        <ASSETNUM>12710</ASSETNUM>
        <DSASSETSLINKID>1004</DSASSETSLINKID>
        <ITEMNUM />
        <LOCATION />
        <ORGID>EAGLENA</ORGID>
        <PLUSCDSASSETLINKID>64</PLUSCDSASSETLINKID>
        <SITEID>BEDFORD</SITEID>
      </PLUSCDSASSETLINK>
    </PLUSDSPLAN>
  </BFPLUSDSPLANSet>
</SyncBFPLUSDSPLAN>
 

You should now be able to navigate to your data sheet template application, bring up the data sheet DS101, and see the above two work assets linked to the data sheet on the work assets tab.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

UID

ibm11132539