MxLoader now supports attachments

I have just implemented the capability to upload attachments straight from MxLoader. This is in response to some requests on my blog and MxLoader support forum.

Starting from Maximo 7.1.1.6 it is possible to import attachments to an object through MIF using Base64 encoding.
MxLoader has the capability to read files from the filesystem, encode them in Base64 and upload them on Maximo. This can be done on any Maximo object that supports attachments but the integration object structure has to be modified to include the DOCLINK object.

In this example the MYASSET object structure has been created with the DOCLINKS child object.

To specify a file to be encoded and uploaded you have to prefix the path of the file with the FileEnc:/ string.
Look at the screenshot below for an example of how to add two attachments to an asset. Note that the first file is using a relative path while the second uses an absolute path.

MxLoader now supports attachments

31 thoughts on “MxLoader now supports attachments

  1. Hi Bruno,In MXloader when I use Classification Hierarchy template,I am trying to send some extra fields but the data is not being updated,Can you please assist.

  2. Hi Bruno – thank you for sharing. Hoping you can clear up an issue for me. I did exactly what you have above. However when I load the file – it loads as a number and is unable to open unless it's a pdf or txt. doc and xls will not open. Data is loading to the doclinks object like this – /fxx/app/xxxxx/maximo/IBM/HTTPServer/htdocs/attachments/1500923495164 – when I try to open it doesn't understand the format – when I load through the front door I see this in doclinks – /fxx/app/xxxxx/maximo/IBM/HTTPServer/htdocs/attachments/excelxls.xls – and it opens fine – please help – ty Dawn

  3. Figured this out. Have to add urlname to the MxLoader before the description column and make it match the description column. Now it updates the url correctly to open.

    1. Im trying to upload attachments from my system local folder, I have the object structure with jobplan and doclinks objects. I also included all those above mentioned columns. The file is getting attached to the record but unable to view the attachment which is an image. Is there anything else to be figured out

  4. Hi Bruno – I have followed the same procedure. I have modified the object structure by adding doclinks object and modified the MXLoader. I am able to import the attachments but not able to view attachments same as Dawn mentioned in earlier post. I have added urlname before description and followed the same value. When I try to view the attachment it is showing as test1508845063507 with special charaters as text.
    Please help

    1. Hi Anand,

      Im also facing the same issue. File getting uploaded but unable to open the file. Can u please help me out

    1. Hi Bruno. Im using MAximo 8.x version and the supporting Mxloader version authenticates through Rest API. So when Im trying to upload attachments throught this loader with Documentdata filepath as “FileEnc:/XXX”, it is throwing error that “Upload of Bynary files is not yet supported for Rest APIs”. Can u please suggest a way forward

  5. MXPO PO Sync-AddChange
    PONUM REVISIONNUM SITEID DOCLINKS.ADDINFO DOCLINKS.URLTYPE DOCLINKS.DOCTYPE DOCLINKS.URLNAME DOCLINKS.DESCRIPTION DOCLINKS.DOCUMENTDATA
    1044 0 RAC 1 FILE Attachments test.txt test.txt file:///C:/Temp/test.txt
    I am using this details in MXLoader. please let me know, if i am missing something.

  6. Hi Bruno,

    I am unable to connect my Maximo server through MXLoader. My Maximo server is a cloud environment.While connecting i am getting some error. It is not connecting to the server. What inputs i need to give to connect my cloud cloud server by using MXLoader file. Please help me out on this.

  7. Is there a maximum file size limit? Or this is Maximo dependent? For example, if Maximo sets it at 10MB that's the limit for MxLoader too?

  8. Order of fields don't do anything for me. I guess unix epoch time stamp as file name. And the contents look like gibberish. Only 1kB seems to be uploaded. File contents look like this: †ÛiÿùšÆ)¨ýÚ –)ä³ø¦j ¬ü#Ò hš–†§z½I

  9. hi Bruno..

    regarding attachment for Job Plan app, I've created the Object structure with doclinks
    but could not upload the files through MX Loader, although I use it for many other issues ( failure codes, assets, persons, … etc)

    please advise
    Thanks in advance

  10. Hi Bruno..

    Is it possible to update (an existing record) a custom attribute in the DOCLINKS table through integration. When I tried to POST, with action as Change, it would create a new record instead of inserting a new record. Please let me know if there is any way to update the custom attribute inside the DOCLINKS table.

    Thanks in advance.

    1. Has this issue been resolved? Regarding updating an existing DOCLINK via MXLoader
      Than you

  11. This is not working against version 7.6.0.9. It creates new record with Sync-AddChange and creates attachment. But when viewing attachment, it shows junk value instead of real file.

  12. “To specify a file to be uploaded you have to prefix the full path of the file with the ‘file:///’ string”

    This is no longer valid. In order to upload the file you need to prefix it with FileEnc:/

    (FileEnc:/C:\Users\filepathxxx)

  13. Hi Bruno,

    Seems like jobplan materials and jplabor wont upload. Jobplan gets created fine but without JPLABOR and JPMATERIAL. Can you help pls? I am in urgent prod need.

    Thanks in advance!!

  14. Hi Bruno / All,

    I was wondering if the MXLoader data loading for attachments also supports when updating an existing DOCLINK. Currently, I couldn’t update an existing DOCLINK using Sync-Change action. It throws an error
    BMXAA1496E – The DOCLINKS record does not exist in the database and cannot be updated or deleted.
    When I used Sync-AddChange it creates again a new record which I only wanted is to update the existing one.

    Thank you

  15. Hi Bruno ,

    I have the same issue where i followed through the exact steps and the txt file imported fine, but when viewing the contents are all gibberish . I am using MX 7.6.1.1

    Please let me know if there is a fix for this or a workaround.
    Thank you

  16. i figured out the issue. The FileEnc:/ was doing nothing to my file and actually i think its messing it up. I converted my file to Base64 string and added this to Mxloader and the file imported fine and is viewing fine as well. So all the files need to be pre converted to Base64 strings prior to upload.

  17. Hi Bruno,
    I am trying to import service items attachments in 7.6 version with mxloader just like you did.
    I receive error code 3002 “File could not be found”, with ADODB.Stream source. Can you help me please?
    Thanks in advance!!

  18. Today I came across this old post and I have see there is a problem in the second screenshot.
    I have updated it including the DOCLINKS.URLNAME column that should resolve your issues.

    1. Hello,

      I was wondering if the MXLoader data loading for attachments also supports when updating an existing DOCLINK. Currently, I couldn’t update an existing DOCLINK using Sync-Change action. It throws an error
      BMXAA1496E – The DOCLINKS record does not exist in the database and cannot be updated or deleted.
      When I used Sync-AddChange it creates again a new record which I only wanted is to update the existing one.

      Thank you

  19. I want to report on WebSphere 9, Maximo 7.6.0.8, I was able to use MxLoader 7.52 to upload attachments. I duplicated MXITEM and called is MXITEMDOC, added DOCLINKS as the fifth ordered item.

    Then I created a new sheet for MXITEM then renamed MXITEMDOC

    These are the header fields I used:

    ITEMNUM
    ITEMSETID
    DESCRIPTION
    DOCLINKS.ADDINFO
    DOCLINKS.URLTYPE
    DOCLINKS.URLNAME
    DOCLINKS.DOCTYPE
    DOCLINKS.DESCRIPTION
    DOCLINKS.DOCUMENTDATA

    CR21XX0005
    SET2
    CR21XX0005
    1
    FILE
    furn1.jpg
    Attachments
    furn1.jpg
    FileEnc:/C:\images\furn1.jpg

  20. I have create a new object and MaxLOADER as per the user guide page 13

    ASSETNUM SITEID DOCLINKS.ADDINFO DOCLINKS.URLTYPE DOCLINKS.URLNAME DOCLINKS.DOCTYPE DOCLINKS.DESCRIPTION DOCLINKS.DOCUMENTDATA
    A100001 TW 1 FILE test1.docx Attachments test1.docx FileEnc:/C:\DVTemp\test1.docx
    A100001 TW 1 FILE test3.pdf Diagrams test3.pdf FileEnc:/C:\DVTemp\test3.pdf
    A100001 TW 1 FILE test2.jpg Images test2.jpg FileEnc:/C:\DVTemp\test2.jpg

    I get is this error:
    Error Code: 500
    Source: DoHttpCall
    Descrption: Internal Server Error
    Error 500: nested exception is: psdi.util.MXSystemException: BMXAA4214E – An unknown error has occurred. Please contact your system administrator for assistance. Gather the logs from the <HOME> directory and determine where and why the error is thrown.
    null

    Cause:

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top