BoydDensmore
BoydDensmore

Reputation: 181

Trigger Maximo MIF integration of object using automation script

Is there a way to trigger the integration of an MBO through MIF using an automation script? Here's the use case:

  1. Child object with no application to manage it is sent through integration
  2. Integration fails at the destination and needs to be resent
  3. Admin opens the automation script in Automation Scripts application, updates the script with the record ID to resend, and click our custom "Execute Script Manually" action which runs the script without the need for a launchpoint.

At a high level the script would look something like this:

from psdi.server import MXServer

server = MXServer.getMXServer()
adminuser = server.getUserInfo("MAXADMIN")
matUseTransSet = server.getMboSet("MATUSETRANS", adminuser)
matUseTransSet.setWhere("MATUSETRANSID = 123456")
matUseTransSet.reset()

matUseTransMbo = matUseTransSet.moveFirst()

while (matUseTransMbo):
    # Send integration here
    matUseTransMbo = matUseTransSet.moveNext()

Thanks!

Upvotes: 2

Views: 1447

Answers (1)

Maximo.Wiki
Maximo.Wiki

Reputation: 631

Perhaps something along the lines of this:

from psdi.server import MXServer

server = MXServer.getMXServer()
adminuser = server.getUserInfo("MAXADMIN")

extSysName = 'SYSNAME'
ifaceName = 'iFaceName'
whereClause = "PRNUM = '12345'"
maxRecCount = 1

# Send integration here
server.lookup("MIC").exportData(ifaceName, extSysName, whereClause, adminuser, maxRecCount)

Upvotes: 2

Related Questions