Issues with Maximo attachment (DOCLINKS)

 Just a bunch of my own personal notes regarding Maximo attachment (DOCLINKS) function.

  •  When a file is attached to a record in Maximo, it creates a record in the DOCLINKS and a record in the DOCINFO table to keep the details of the file. The file is copied to a location on disk, usually on a local folder (e.g. D:\DOCLINKS) or on a network shared folder. The path for Maximo to read the file is kept in the URLNAME field of the DOCINFO table.
  • To setup this function, refer to this blog post by Bruno on MaximoDev blog (https://bportaluri.com/2014/06/attachments-doclinks-configuration.html)
  • When a user uploads an attachment, the location where Maximo puts the file will depend on the Folder selected:
    • In most applications such as Work Order Tracking or Assets, there is a Select Action > Attachment Library/Folders > Manage Folder function, it allows you to specify the location to keep the file for each Folder.
    • If no path is specified for a folder, Maximo uses default value of the System Properties:  mxe.doclink.doctypes.defpath
    • This setting controls where to keep the file when uploading. After a migration or upgrade in which you moved your file server location, and if new files still end up in the old location. This is where you should update your settings
  • When a user clicks on the link to download an attachment, there are two methods for Maximo to serve the file.
    • If System Property: mxe.doclink.securedAttachment is set to False (default), the HTTP Web Server will read the file from disk, then serve it to the end-users. Maximo application server doesn’t play a role in delivering the file here.
      • If System Property: mxe.doclink.securedAttachment is set to True, when the end-user downloads an attachment, Maximo application server will grab the file, encrypt it, then serve it to the end-user. Thus, in this case, we don’t really need the web server for it to work. I.e. if you accessing Maximo directly on the application server (via port 908x), it will still work. Thus, in a clustered environment in which a load balancer distributes load directly to Maximo JVMs without a web server in the middle, this is the recommended choice.
    • The link to download an attachment is kept in DOCINFO.WEBURL non-persistent field. The value of this field is generated by replacing the URLNAME field of the DOCINFO record, with the rule set in the mxe.doclink.pathXX property. 

    For example, if you have the following rule:

    mxe.doclink.path01= D:\DOCLINKS\=https://maximo.company.com/attachments/ 

    For a document with URLNAME=D:\DOCLINKS\drawing\file01.pdf, the WEBURL would be https://maximo.company.com/attachments/drawing/file01.pdf.

    If the first part of URLNAME doesn’t match with the left-side of the PATH01 equation, Maximo will look at mxe.doclink.path02, path03 and so on to replace the value and generate a WEBURL.

    If there’s no match, it will generate WEBURL with an absolute path: file://[URLNAME]. This means, if the user has access to the file on the shared network path, it will still work without the need of a web server.

    In summary, I usually hit with issues with doclinks after an upgrade or migration, below are my check list to avoid those issues:

    • If a new Web server is set up, need to update DocumentRoot, and Directory setting in the web server’s httpd.conf file
    • If the Web URL to access Maximo changes: need to update mxe.doclink.path01
    • If the file server location moved:
      • Need to copy the file to new location
      • Maximo service account should have permission to access the local/network folder
      • Update the  mxe.doclink.doctypes.topLevelPaths, mxe.doclink.doctypes.defpath, mxe.doclink.path01
      • Update the DOCTYPES.DEFAULTFILEPATH in the database with a REPLACE sql command
      • Update all DOCINFO.URLNAME in the database with a REPLACE sql command


    No comments:

    Post a Comment