Technical Blog Post
Adding and updating Job Plan work assets through MIF
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.
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.
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:
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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creationDateTime="2015-04-13T16:06:26-04:00" transLanguage="EN" baseLanguage="EN" messageID="1428955586732900178" maximoVersion="7 5 20140411-2000 V7511--1" event="0">
<FNCONOFFSET xsi:nil="true" />
<PRIORITY xsi:nil="true" />
<STCONOFFSET xsi:nil="true" />