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
------------------------------
Original Message:
Sent: 05-09-2023 05:52
From: Manuel Guyot
Subject: Upload Image to IMGLIB for ITEM.
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
------------------------------