Search This Blog

Tuesday, January 30, 2024

How to import attachments into MAXIMO using MIF

 How to upload file using MIF (Maximo Integration Framework)?

  1. Create Object Structure.

You have two scenarios:

  1. Send only the attachment using table DOCLINKS.
  2. Send the attachment owner with DOCLINKS table, like WORKORDER,SR, ITEM, etc. To know if the desired table is supported, a tip is execute query below:

select parent from maxrelationship where child = 'DOCLINKS';

Observation: You can also create an Enterprise Service, but in this example, we will use only Object Structure.

 

  1. Create Web Service.

I am not going to enter in every detail of Web Service creation. You just need to create and deploy Web Service. You can do that using Web Services Library application.


  1. Submit the XML.

You can use any tool to submit XML into Web Service. I usually use SoapUI, it’s simple and easy to use.

https://www.soapui.org/
 

The XML below is just a sample having the required attributes.

XML:

  1. Scenario 01: In this scenario you are going to upload the file to the server into doclinks folder. (In my case C:\doclinks\attachments)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:max="http://www.ibm.com/maximo"&gt;
   <soapenv:Header/>
   <soapenv:Body>
      <max:SyncMXDOCLINK>
         <max:MXDOCLINKSet>
              <max:SR action="AddChange">
               <max:DESCRIPTION >Test 01 SR description</max:DESCRIPTION>
                <max:ORGID>EAGLENA</max:ORGID>
                <max:SITEID>BEDFORD</max:SITEID>

                 <max:DOCLINKS>
                  <max:ADDINFO>1</max:ADDINFO>
                  <max:COPYLINKTOWO>0</max:COPYLINKTOWO>
                  <max:DESCRIPTION>Example of Attach </max:DESCRIPTION>
                  <max:DOCTYPE>Attachments</max:DOCTYPE>
                  <max:DOCUMENT>Test 01</max:DOCUMENT>
                  <max:DOCUMENTDATA>MTIzMTMyMzE=</max:DOCUMENTDATA>
                  <max:OWNERTABLE>SR</max:OWNERTABLE>
                  <max:UPLOAD>1</max:UPLOAD>
                  <max:URLNAME>C:\DOCLINKS\ATTACHMENTS\testfile01.txt</max:URLNAME>
                  <max:URLTYPE>FILE</max:URLTYPE>
               </max:DOCLINKS>

            </max:SR>
         </max:MXDOCLINKSet>
      </max:SyncMXDOCLINK>
   </soapenv:Body>
</soapenv:Envelope>

 

Reference Link : https://www.ibm.com/support/pages/how-import-attachments-maximo-using-mif 

 

No comments:

Post a Comment

MAS and Manage custom resources are not reconciled

  After a change was applied to IBM Maximo Application Suite (MAS) or IBM Maximo Manage, the custom resources are not reconciled. For exampl...