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()
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
Original Message:
Sent: Thu January 30, 2025 12:15 AM
From: Pankaj Bhide
Subject: MAS 9 to Manage user synchronization
Hello,
For the several years, we follow below mentioned conventions for users and persons in MAXIMO 7.6. There is absolutely no possibility for the business to change to the best practises in this connection.
Person id: A numeric number e.g. 999999
Email Id: JoneDoe@company.com
User Id: JoneDoe
SAMLID: JoneDoe
Our custom integration programs populate the details of PERSON, EMAIL and PHONE MBOs. This happens much earlier before the new employee is introduced in MAS 9. For example, a new employee with person id 555555, Email id: JamesBond@company.com is joined the organization. His details in PERSON, EMAIL and PHONE MBOs are synchronised in Manage.
Now, he is introduced to the Facilities dept and the system administrator adds his details in MAS 9 having details such as Useid: JamesBond, Email id=JamesBond@company.com, SAMLId= JamesBond
The cron task that syncs MAS 9 to Manage will create additional person and possibly the related MBOs (e.g. email, phone etc) records in manage which we don't want.
To address this, I am trying to do the following:
Develop an automation script OSIN.MASPERUSER (integration script that intercepts the message for MAXUSER MBO) that does the following:
Get the value of the email address from the external record (ER).
Read the "EMAIL" mbo with the following condition:
email.emailaddress=<email address from ER>
If the record does not exist then, raise the exception with the error message suggesting "email/person details do not exist in Manage for the user xxxxxx" and skip processing that row and go to the next row.
If the record exists in "EMAIL" mbo, then, get the value of "email.personid" into the variable "personid".
Map the value of "personid" to "maxuser.personid".
Lastly, skip processing the information in "person", "email" and "phone" MBOs by executing the method titled "skipMbo". This way, it will not insert/update the records into "email","person" and "phone" mbos.
if (ctx.getMosDetailInfo().getObjectName() == "EMAIL" or
ctx.getMosDetailInfo().getObjectName() == "PERSON" or
ctx.getMosDetailInfo().getObjectName() == "PHONE"):
ctx.skipMbo()
My challenge is how to access the ER record? What API call (any example?) will allow me getting email address from ER?
Please help.
Thanks
------------------------------
Pankaj Bhide
------------------------------