Sorry for the inconvenience.
The run of the script gives the following log
06 Feb 2025 09:28:27:218 [INFO] [MXServer] [CID-CRON-288590] [pool-4-thread-12] Correlation started, correlation data added: TaskName:AsyncImmediateJobCron
06 Feb 2025 09:28:27:218 [INFO] [MXServer] [CID-CRON-288590] [pool-4-thread-12] Correlation started, correlation data added: InstanceName:AsyncImmediate TaskName:AsyncImmediateJobCron
06 Feb 2025 09:28:27:218 [INFO] [MXServer] [CID-CRON-288590] [pool-4-thread-12] Correlation started, correlation data added: InstanceName:AsyncImmediate TaskName:AsyncImmediateJobCron Activity:ACTION
06 Feb 2025 09:28:27:251 [DEBUG] [MXServer] [] [maximo-ReportCancelStatusUpdateThread] ReportCancelStatusUpdateThread getting cancelled reports from database
06 Feb 2025 09:28:27:356 [INFO] [MXServer] [CID-CRON-288590] [pool-4-thread-12] Correlated data: BEGIN InstanceName:AsyncImmediate TaskName:AsyncImmediateJobCron Activity:ACTION ElapsedTime:138 ms END
06 Feb 2025 09:28:28:387 [WARN] [MXServer] [] [Default Executor-thread-10440] BMXAA7785W - Property mxe.defaultgroups.manage.admin does not exist.
06 Feb 2025 09:28:28:387 [WARN] [MXServer] [] [Default Executor-thread-10440] BMXAA7785W - Property mxe.defaultgroups.hputilities.admin does not exist.
06 Feb 2025 09:28:28:387 [WARN] [MXServer] [] [Default Executor-thread-10440] BMXAA7785W - Property mxe.defaultgroups.hputilities.user does not exist.
06 Feb 2025 09:28:28:387 [WARN] [MXServer] [] [Default Executor-thread-10440] BMXAA7785W - Property mxe.defaultgroups.predict.admin does not exist.
06 Feb 2025 09:28:28:387 [WARN] [MXServer] [] [Default Executor-thread-10440] BMXAA7785W - Property mxe.defaultgroups.predict.user does not exist.
06 Feb 2025 09:28:28:387 [WARN] [MXServer] [] [Default Executor-thread-10440] BMXAA7785W - Property mxe.defaultgroups.health.admin does not exist.
06 Feb 2025 09:28:28:387 [WARN] [MXServer] [] [Default Executor-thread-10440] BMXAA7785W - Property mxe.defaultgroups.health.user does not exist.
06 Feb 2025 09:28:28:409 [ERROR] [MXServer] [] [Default Executor-thread-10440] Error from script OSIN.MASPERUSER launchPointName: null
06 Feb 2025 09:28:28:410 [ERROR] [MXServer] [] [Default Executor-thread-10440] Die Verarbeitung für MASPERUSER ist fehlgeschlagen. Die Objekt ist 1. Das primäre Objekt ist PERSON. Der Schlüssel ist TTTMIBH.<msggrp>#<msgkey>
06 Feb 2025 09:28:28:411 [ERROR] [MXServer] [] [Default Executor-thread-10440] Error while processing the incoming transaction
psdi.util.MXApplicationException: <msggrp>#<msgkey>
at com.ibm.tivoli.maximo.script.ScriptService.error(ScriptService.java:455) ~[businessobjects.jar:?]
at jdk.internal.reflect.GeneratedMethodAccessor642.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:572) ~[?:?]
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190) ~[jython.jar:2.7.3]
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:208) ~[jython.jar:2.7.3]
at org.python.core.PyObject.__call__(PyObject.java:512) ~[jython.jar:2.7.3]
at org.python.core.PyObject.__call__(PyObject.java:517) ~[jython.jar:2.7.3]
at org.python.core.PyMethod.__call__(PyMethod.java:171) ~[jython.jar:2.7.3]
at org.python.pycode._pyx181.mboRules$1(<script>:31) ~[?:?]
at org.python.pycode._pyx181.call_function(<script>) ~[?:?]
at org.python.core.PyTableCode.call(PyTableCode.java:173) ~[jython.jar:2.7.3]
at org.python.core.PyBaseCode.call(PyBaseCode.java:306) ~[jython.jar:2.7.3]
at org.python.core.PyFunction.function___call__(PyFunction.java:474) ~[jython.jar:2.7.3]
at org.python.core.PyFunction.__call__(PyFunction.java:469) ~[jython.jar:2.7.3]
at org.python.core.PyFunction.__call__(PyFunction.java:459) ~[jython.jar:2.7.3]
at org.python.core.PyFunction.__call__(PyFunction.java:454) ~[jython.jar:2.7.3]
at org.python.jsr223.PyScriptEngine.invokeFunction(PyScriptEngine.java:145) ~[jython.jar:2.7.3]
at com.ibm.tivoli.maximo.script.JSR223ScriptDriver.evalScript(JSR223ScriptDriver.java:270) ~[businessobjects.jar:?]
at com.ibm.tivoli.maximo.script.AbstractScriptDriver.runScript(AbstractScriptDriver.java:155) ~[businessobjects.jar:?]
at psdi.iface.mos.MosProcessImpl.scriptMboRules(MosProcessImpl.java:630) ~[businessobjects.jar:?]
at psdi.iface.mos.MosProcessImpl.setMainMaximoTable(MosProcessImpl.java:1114) ~[businessobjects.jar:?]
at psdi.iface.mos.MosProcessImpl.fillMaximoTables(MosProcessImpl.java:807) ~[businessobjects.jar:?]
at psdi.iface.mos.MosProcessImpl.processExternalData(MosProcessImpl.java:345) ~[businessobjects.jar:?]
at psdi.iface.mic.MicSetIn.processExternalData(MicSetIn.java:149) ~[businessobjects.jar:?]
at psdi.iface.mic.EntMicService.processDataIn(EntMicService.java:1750) ~[businessobjects.jar:?]
at psdi.iface.mic.EntMicService.processExternalData(EntMicService.java:1646) ~[businessobjects.jar:?]
at psdi.iface.mic.EntMicService.processExternalData(EntMicService.java:1474) ~[businessobjects.jar:?]
at com.ibm.tivoli.maximo.intservice.EnterpriseService.secureProcessExternalDataSyncInternal(EnterpriseService.java:169) ~[businessobjects.jar:?]
at com.ibm.tivoli.maximo.intservice.EnterpriseService.maxAPIKeySecureProcessExternalDataSync(EnterpriseService.java:122) ~[businessobjects.jar:?]
at psdi.iface.util.WebUtil.invokeEnterpriseEJB(WebUtil.java:247) ~[meaweb.war:?]
at psdi.iface.servlet.MEAServlet.invokeEJB(MEAServlet.java:538) ~[meaweb.war:?]
at psdi.iface.servlet.MEAServlet.doPost(MEAServlet.java:359) [meaweb.war:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:706) [com.ibm.websphere.javaee.servlet.4.0_1.0.95.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:791) [com.ibm.websphere.javaee.servlet.4.0_1.0.95.jar:?]
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1266) [com.ibm.ws.webcontainer_1.1.95.jar:?]
at [internal classes]
at com.ibm.tivoli.maximo.filter.UnSupportedMethodBlockFilter.doFilter(UnSupportedMethodBlockFilter.java:60) [commonweb.jar:?]
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:203) [com.ibm.ws.webcontainer_1.1.95.jar:?]
at [internal classes]
at com.ibm.tivoli.maximo.filter.MTIntegrationFilter.doFilter(MTIntegrationFilter.java:68) [meaweb.war:?]
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:203) [com.ibm.ws.webcontainer_1.1.95.jar:?]
at [internal classes]
[com.ibm.ws.channelfw_1.0.95.jar:?]
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:586) [com.ibm.ws.channelfw_1.0.95.jar:?]
at [internal classes]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:839) [?:?]
------------------------------
Günter Metzner
------------------------------
Original Message:
Sent: Wed February 05, 2025 12:58 PM
From: Andrzej Więcław
Subject: MAS 9 to Manage user synchronization
Hi Pankaj,
I'm not sure what do you mean... Could you please elaborate a bit more what is it that is not working?
Basically when the script finds a PERSON record by e-mail, then it injects it into the integration pipeline and MAXUSER record gets created for given PERSON, therefore MAXUSER.PERSONID gets set to PERSON.PERSONID.
------------------------------
Andrzej Więcław
Maximo Technical Consultant
AFRY
Wrocław, Poland
------------------------------
Original Message:
Sent: Wed February 05, 2025 09:45 AM
From: Pankaj Bhide
Subject: MAS 9 to Manage user synchronization
Hello,
Thanks for your advice and help. I was able to follow the script.
Any clue how to map the value person id to "maxuser.personid"?
Thanks again.
------------------------------
Pankaj Bhide
Original Message:
Sent: Fri January 31, 2025 05:47 AM
From: Andrzej Więcław
Subject: MAS 9 to Manage user synchronization
Hi Pankaj,
this sounds just like the process at one of my customers :-)
There are probably other ways to do it but I would recommend creating Object Structure integration processing automation script for MASPERUSER object structure which may look as follows.
Script Name: OSIN.MASPERUSER
Script Source:
from psdi.mbo import SqlFormatdef mboRules(ctx): table = ctx.getProcessTable() if table == "PERSON": data = ctx.getData() # Mark the character casing - for parent/child navigation you need to use upper-case names emails = data.getChildrenData("EMAIL") # Find primary e-mail - example code below looks for a first found primary e-mail # Mark the character casing - you need to use lower-case to access JSON attributes primaryEmail = next((e.getCurrentData("emailaddress") for e in emails if e.getCurrentDataAsBoolean("isprimary")), None) # Find PERSON record with given e-mail mboSet = ctx.getMboSet() sqf = SqlFormat(ctx.getUserInfo(), "exists(select 1 from email where email.personid = person.personid and email.emailaddress = :1)") sqf.setObject(1, "EMAIL", "EMAILADDRESS", primaryEmail) mboSet.setWhere(sqf.format()) mbo = mboSet.moveFirst() if mbo: # Inject identified person MBO into the integration processing pipeline. # The rule is that if mboRules function returns MBO (through the ctx) then # the integration logic does not look for one on its own using standard rules. # The other way to do this would be to simply override "personid" column value # in the inbound JSON structure data but passing back MBO you save one # SQL query as the object to be processed has already been identified. ctx.setMbo(mbo) else: # Raise exception ctx.error("<msggrp>", "<msgkey>", [ "param1" ]) elif table in ["EMAIL", "PHONE"]: # Skip updates to the EMAIL and PHONE tables ctx.skipMbo()#end def
MASPERUSER object structure, used by MAS Core to Manage synchronization, uses PERSON record at the top level and you cannot really skip this one as you would not let the integration logic create corresponding child level MAXUSER record (PERSON/MAXUSER). If you do not want MAS Core to update person's details (display name, title, etc.) then you can do that by enabling Inbound Setting Restrictions for the attributes you're interested in.
------------------------------
Andrzej Więcław
Maximo Technical Consultant
AFRY
Wrocław, Poland