Skip to content

Document-Handler-Maximo-Imglib

  • Stores the uploaded document, i.e. an image, in Maximo IMGLIB database table.
    • In detail, a Maximo automation script is called that takes care of saving an image dataset in the IMGLIB table.

Prerequisites

  • The eam.url must be set in the insight.properties.

Configuration

  • A document config could look like this:
"documents": [
            {
                "name": "fileupload",
                "label": "Fotos",
                "type": "Foto",
                "nodeReference": "IMGLIB",
                "backendParams": {
                    "REFOBJECT": "ITEM",
                    "REFOBJECTID": "${ITEMID}",
                    "IMAGENAME": "TEST IMAGE",
                    "MIMETYPE": "image/jpeg",
                    "SCRIPTNAME": "IMGLIB_SAVE"
                },
                "imageEdit": {
                    "disabled": true
                },
                "fileReplace": true,
                "handler": "maximo-imglib"
            }
        ],
        ...
  • As handler maximo-imglib has to be set
  • The backendParams REFOBJECT, REFOBJECTID, IMAGENAME, MIMETYPE, SCRIPTNAME etc. correspond to the attributes of the IMGLIB table, which are ultimately used by the automation script to create a new IMGLIB data record.
    • SCRIPTNAME is required and specifies the name of the Maximo automation script which has to be defined.
  • nodeReference is required to provide the node name containing the file data.
"children": [
    {
        "name": "IMGLIB",
        "type": "IMGLIB",
        "title": "Artikelbild",
        "label": "${IMAGENAME}",
        "bucket": "Artikelbild",
        "bucketIcon": "icon-fire",
        "bucketMode": "hidden",
        "query": {
            "constraint": "refobject = 'ITEM' and refobjectid = (select ITEMID from ITEM where ITEMNUM = '${ITEMNUM}')",
            "db": true
        },
        "attributes": [
            {
                "name": "IMGLIBID",
                "type": "Decimal",
                "readonly": true
            },
            {
                "name": "IMAGENAME",
                "type": "String",
                "readonly": true
            },
            {
                "name": "IMAGE",
                "type": "Base64",
                "readonly": true
            },
            {
                "name": "MIMETYPE",
                "type": "String",
                "readonly": true
            }
        ],
        "fileLink": {
            "data": {
                "attribute": "IMAGE",
                "mimeAttribute": "MIMETYPE"
            }
        }
    }
]