IBM Support

Adding and updating Job Plan work assets through MIF

Technical Blog Post


Abstract

Adding and updating Job Plan work assets through MIF

Body

You can add and modify work assets to your Job Plans using the Maximo Integration Framework.  There are a fiew things to note in order to get this to work.  As you may have discovered, there is currently no out-of-the-box interface that works for this purpose.  The object structure that would be needed consists of the JOBPLAN and JPASSETLINK objects, however you will need to make sure the correct key attributes are included and an alternate key is used when updating child records.

 

Here are the steps that you can use to add or update your work assets associated with an existing job plan.

 

1.  As a first step, create an integration object structure.  This object structure will require two objects. 

2.  Add the first object which is JOBPLAN.

3.  Next, add the second object, which is JPASSETLINK.  Make sure the processing order is set to a value of 1 for JOBPLAN, and 2 for JPASSETLINK.

 

image
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4.  From the Select Action menu, select "advanced configuration".  Uncheck "Exclude Parent Key Attributes".  This ensure that the child objects key attributes "siteid", "orgid", and "jobplanid" are included in the JPASSETLINK object so an asset can be correctly found and validated during the transaction processing.

 

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5.  If you plan to use a flat file structure, ensure you modify the aliases associated with these attributes so they have unique column names.

6.  Next, you will need to specify an alternate key on the JPASSETLINK child object.  This is needed because the parent key used by default is the attribute associated with the primarykeycolseq value assigned to the JPASSETLINKID attribute in database configuration, which is not known prior to sending in the data.  Since this attribute is restricted, Maximo will not use the value sent in with the transaction while adding new work assets.  Any updates to this work asset record will result in an Add operation if we do not send in the correct JPASSETLINKID value.  The attempt by the MIF to add the record will result in an error.

The Alternate key used for this transaction to succeed is JPASSETLINK_NDX4 as shown below.  This alternate key contains ASSETNUM and JPNUM, which are both attributes for which we will know the values ahead of time:

image

 

 

 

 

 

 

 

7.  Now you can create your enterprise services, and publish channels if needed, and enable them on your external system.

 

8.  Once done, you can import a transaction to add work assets to an existing job plan.  I've included a sample of a transaction that will add two work assets to the job plan with the JPNUM BREAKINSP:

 

<?xml version="1.0" encoding="UTF-8"?>
<SyncMYJPASSETLINK xmlns="http://www.ibm.com/maximo&#34; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&#34; creationDateTime="2015-04-13T16:06:26-04:00" transLanguage="EN" baseLanguage="EN" messageID="1428955586732900178" maximoVersion="7 5 20140411-2000 V7511--1" event="0">
  <MYJPASSETLINKSet>
    <JOBPLAN>
      <AMCREW />
      <AMS>0</AMS>
      <AOS>0</AOS>
      <APPTREQUIRED>0</APPTREQUIRED>
      <ASSIGNEDOWNERGROUP />
      <CALENDAR />
      <CLASSSTRUCTUREID />
      <CREWID />
      <CREWWORKGROUP />
      <DESCRIPTION>Breaker Inspection</DESCRIPTION>
      <DOWNTIME>0</DOWNTIME>
      <FLOWACTION />
      <FLOWACTIONASSIST>0</FLOWACTIONASSIST>
      <FLOWCONTROLLED>0</FLOWCONTROLLED>
      <FNCONOFFSET xsi:nil="true" />
      <HASNESTEDJP>0</HASNESTEDJP>
      <INCTASKSINSCHED>1</INCTASKSINSCHED>
      <INTERRUPTIBLE>0</INTERRUPTIBLE>
      <JOBPLANID>84</JOBPLANID>
      <JPDURATION>0.5</JPDURATION>
      <JPNUM>BREAKINSP</JPNUM>
      <LABORCODE />
      <LAUNCHENTRYNAME />
      <LMS>0</LMS>
      <LOS>0</LOS>
      <ORGID>EAGLENA</ORGID>
      <OWNER />
      <OWNERGROUP />
      <PERSONGROUP />
      <PRIORITY xsi:nil="true" />
      <REQASSTDWNTIME>0</REQASSTDWNTIME>
      <SITEID />
      <STATUS maxvalue="ACTIVE">ACTIVE</STATUS>
      <STCONOFFSET xsi:nil="true" />
      <SUPERVISOR />
      <SUSPENDFLOW>0</SUSPENDFLOW>
      <TEMPLATETYPE maxvalue="MAINTENANCE">MAINTENANCE</TEMPLATETYPE>
      <JPASSETSPLINK>
        <ASSETNUM>CAL100</ASSETNUM>
        <ISDEFAULTASSETSP>1</ISDEFAULTASSETSP>
        <ITEMNUM />
        <ITEMSETID />
        <JOBPLANID>84</JOBPLANID>
        <JPASSETSPLINKID>20143</JPASSETSPLINKID>
        <JPNUM>BREAKINSP</JPNUM>
        <LOCATION />
        <ORGID>EAGLENA</ORGID>
        <SAFETYPLANID />
        <SITEID>BEDFORD</SITEID>
        <WOREQWHENPURCH>0</WOREQWHENPURCH>
        <WOTYPEWHENPURCH />
      </JPASSETSPLINK>
      <JPASSETSPLINK>
        <ASSETNUM>12710</ASSETNUM>
        <ISDEFAULTASSETSP>1</ISDEFAULTASSETSP>
        <ITEMNUM />
        <ITEMSETID />
        <JOBPLANID>84</JOBPLANID>
        <JPASSETSPLINKID>20145</JPASSETSPLINKID>
        <JPNUM>BREAKINSP</JPNUM>
        <LOCATION />
        <ORGID>EAGLENA</ORGID>
        <SAFETYPLANID />
        <SITEID>BEDFORD</SITEID>
        <WOREQWHENPURCH>0</WOREQWHENPURCH>
        <WOTYPEWHENPURCH />
      </JPASSETSPLINK>
    </JOBPLAN>
  </MYJPASSETLINKSet>
</SyncMYJPASSETLINK>

 

 

[{"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

ibm11113975