BMXAA4017E Error when running custom code


I went in to help this client fixing a few issues in Maximo. There were some pieces of buggy Java code, so I took the opportunities to remove those Java customization and rewrite them with autoscript. One piece of code worked well in DEV but when rolled out to PROD, it did not seem to work. It is triggered by user’s Save event, but executed at "post commit", thus does not give any error on UI. In the log file, it shows error BMXAA4017E “object cannot be saved with the data that was provided” from the mbo.checkQualifiedRestriction method:




This client has an interesting environment with 5 servers in remote areas synchronized to central server via satellite using SRO solution. Although the number of active users is low, they have 500-600 users spreading across nearly 20 sites. Thus, there are many data restriction rules configured at various levels: global, site, security group etc. This one gave me a chill down my spine during the PROD deployment because I simply couldn’t think of where to start to find what restriction rule that caused the issue when I looked at a long list of rules configured for just this one object. When I was almost announcing a fail deployment, a random thought came up and it helped me fix the issue.

In short, to update a record, I fetched it from the DB using MXServer.getMboSet() method and passed in the SystemUserInfo as I always do:



That where the problem comes about, that “SystemUser” guy does not belong to any Security Group or listed in any security restriction rules, so one of those rules must have failed and caused the error. To fix it, I changed it to the actual user who initiated the action as below:



To be honest, I still haven’t figured out why the same code using SystemUserInfo works in DEV and TEST environment but not in PROD. But as an engineer, not a scientist, I guess it’s ok to not knowing the “Why” sometimes, as long as it works 😊






No comments:

Post a Comment