MxLoader

 View Only
  • 1.  Upload Image to IMGLIB for ITEM.

    Posted 05-09-2023 05:52
    Edited by Manuel Guyot 05-09-2023 06:02

    Hi,

    I am using MxLoader 8.2 with Maximo 7.6.1.2 and try to upload picture connected to ITEM. 
    This is my MxLoader:

    MXL_ITEMPIC ITEM AddChange itemnum="19351"        
    ITEMNUM ITEMSETID DESCRIPTION STATUS IMGLIB.IMAGE IMGLIB.IMAGENAME IMGLIB.MIMETYPE [RESULT]
    19351 ISSE VENTIL FESTO JH-5-1/2 ACTIVE FileEnc:/C:\Temp\Reservdelar\10165.jpg 10165.jpg image/jpeg OK


    I can see that the picture is uploaded to Maximo with the right information but the picture is "broken", I can't see it or open it.


    I have started the Debug mode in MxLoader and copied the information saved into IMGLIB/IMAGE, pasted it in a Base64 decoder and the picture is the same than the one I uploaded, so what did I do wrong?

    Anyone who succeed in uploading picture to ITEM with MxLoader?

    Thanks.



    ------------------------------
    Manuel Guyot
    Husqvarna AB
    ------------------------------



  • 2.  RE: Upload Image to IMGLIB for ITEM.

    Posted 06-29-2023 01:06
    After some test and research, I found what was missing.
    I had to create a script for integration connected to MXITEM like this:
    from org.apache.axiom.om.util import Base64
     
    def afterMboData(ctx): 
     if ctx.getMboName()=='IMGLIB': 
      ctx.getMbo().setValue("IMAGE",Base64.decode(ctx.getData().getCurrentData("IMAGE")))
    And had to add IMGLIB to object MXITEM.
     
    Then it was working without any problem.



    ------------------------------
    Manuel Guyot
    Husqvarna AB
    ------------------------------



  • 3.  RE: Upload Image to IMGLIB for ITEM.

    Posted 03-06-2024 00:22

    Hi, I tried this method and getting below error:

    Internal Server Error
    Error 500: BMXAA4211E - Database error number 2601 has occurred when operating on IMGLIB :  Unique Id=12,233. Report the error to the owner of the deployment.

    I created integration script for MXITEM with your code for inbound processing. In MXLOADER I've tried two different object structures, MXITEM adn MXLITEM (created new) but getting the same error. 

    I'd really appreciate if you can provide your insights.

    Cheers

    Hammad



    ------------------------------
    Hammad Najeeb Ghumman
    Keolis Downer
    ------------------------------