Maximo Integration

Expand all | Collapse all

How to use additional object structure in enterprise service

  • 1.  How to use additional object structure in enterprise service

    Posted Fri December 04, 2020 09:23 AM
    Try to find some example on the additional object structure function in ES, but cannot find any useful information except then document on how to add it on ES setting page. The business need is trying to add other MBO before create primary MBO, for example, receive payload from external system to create service request along with work order. To create work order related to service request, service request MBO need to created first, and use this new ticket ID for related record id to create work order. In ES setting, primary object structure can be work order, additional object structure can be service request, can anyone please help to provide an example on what should be payload for multiple object structures setting on ES looks like? And how to pass new ticket ID in the additional object structure to the work order object structure?
    Thanks!

    ------------------------------
    Jacky Qiu
    Certified IBM Maximo
    ------------------------------


  • 2.  RE: How to use additional object structure in enterprise service

    Posted Mon December 07, 2020 12:20 PM
    The general approach is that the inbound payload has enough data to satisfy both object structures mxwo and mxsr.  in the additional OS configuration you would specify mxsr and then provide a class/script/xsl that would map the inbound payload to mxsr. then in the mxwointerface ES you would provide code to map inbound payload to MXWO.  I would say you need to add the relatedrecord mbo to the mxwo object structure and then map that ticketid value you set on mxsr  to the corresponding value in related records.

    ------------------------------
    Tom Sarasin
    Maximo Designer
    IBM
    (978) 899-2592
    ------------------------------



  • 3.  RE: How to use additional object structure in enterprise service

    Posted Tue December 08, 2020 07:07 AM
    Hi Tom,
    Really appreciate your response!
    I configured 2 object structures: MXRSR and MXRWO. In MXRWO, workorder is the primary MBO, RELATEDRECORD is the child with RELATEDTICKET relationship. I configured an enterprise service MXRSRWOES, which is set MXRWO to be the primary OS, and add MXRSR to be additional OS. Added MXRSRWOES to external system EXTSYS1. But I got stuck on the following points. Could you please help to explain more detail?
    1. "the inbound payload has enough data to satisfy both object structures mxwo and mxsr"
    What's the payload should looks like to cover both object structure? When I tried to generate xml through ES, it will only generate primary OS MXRWO, the following is the structure of the xml, what should be the structure to cover additional OS MXRSR?
    <?xml version="1.0" encoding="UTF-8"?>
    <max:SyncMXRWO xmlns:max="http://www.ibm.com/maximo" creationDateTime="2008-09-29T01:49:45" baseLanguage="string" transLanguage="string" messageID="string" maximoVersion="string">
      <max:MXRWOSet>
        <max:WORKORDER>


    2. "the mxwo object structure and then map that ticketid value you set on mxsr  to the corresponding value in related records"
    How to map ticketid value in MXRWO from MXRSR? 

    Really appreciate your time and help!
    Thanks!


    ------------------------------
    bao qiu
    ------------------------------



  • 4.  RE: How to use additional object structure in enterprise service

    Posted Wed December 09, 2020 09:37 AM
    Hi,  the inbound payload of an Enterprise Service can be any xml format.  What is required is that when the message flows from the ES layer to the object structure layer, the XML format then has to be in format that the object structure understand (OS schema).  So you ES layer has to transform the XML twice, once to map to SR format and once to transform to the WO format.  One suggestion would be to create a publish channel for each OS and do an export (XML file end point) of an SR and WO to get a sample xml for each.  Use these as a guide as to what your enterprise service code would need to provide using the inbound payload as the source.  Keep in mine (you may already know), that you need minimal data for each - WO you probably only need the wonum and siteid.  for SR you need ticketid and class if I'm remembering correctly.  I would use Postman to do quick tests on the Payload format and once you are getting the results you want, implement the code needed to transform the inbound payload to those payloads (WO and SR)

    ------------------------------
    Tom Sarasin
    Maximo Designer
    IBM
    (978) 899-2592
    ------------------------------



  • 5.  RE: How to use additional object structure in enterprise service

    Posted Wed December 09, 2020 10:44 AM
    Hi Tom,
    Thank you very much for the instruction!
    Still stuck at the point of how to connect WO and SR. I can use postman to pull out xml format for the object structure of MXRSR and MXRWO. The key point is how to connect SR (new ticketID) to WO related ID. Do you have any example or document I can refer to?
    Thanks!

    ------------------------------
    bao qiu
    ------------------------------



  • 6.  RE: How to use additional object structure in enterprise service

    Posted Wed December 09, 2020 10:51 AM
    Are you letting Maximo auto-generate the ticketid and then trying to figure out how to get it so it can mapped in the WO payload?

    ------------------------------
    Tom Sarasin
    Maximo Designer
    IBM
    (978) 899-2592
    ------------------------------



  • 7.  RE: How to use additional object structure in enterprise service

    Posted Wed December 09, 2020 11:39 AM
    Hi Tom,
    Yes, the requirement is external system will send new incident (we call service request in Maximo) to Maximo through enterprise, in Maximo, we need to create a new Service Request along with related Work order from this inbound payload. Our current solution we have is to create object structure to have SR as parent MBO, WO as the child MBO, in the WO, use relatedID to connect SR and WO. And in ES user exit, we created a new service request in the code and save it to database, update erdata xml to put new ticketID value to relatedID in WO section, and post updated xml to object structure process class. It can solve the problem, but the only issue for this solution is that if object structure process fail, it will have a junk service request in database which is created in ES user exit. It is not elegant solution. That's why I am looking for the solution to see if we can use ES multiple object structures to solve this problem. But unfortunately I cannot find any useful example or document have detail information on ES multiple object structures. Really appreciate if you can provide some thoughts or guidelines on it. 
    Thanks!

    ------------------------------
    Jacky Qiu
    Technical EAM Director
    Stellar Services
    Atlanta, GA
    ------------------------------



  • 8.  RE: How to use additional object structure in enterprise service

    Posted Wed December 09, 2020 03:08 PM
    so if you use one ES (for work order) and use an additional object structure (for SR) the processing will done as a single commit (all or none).
    So you additional OS (SR) will process first and you need to provide code to map ERdata to MXSR
    then the WO ES will process second  and map ERdata to WO and Relatedrecord
    I don't have a code example for this
    but you should just map ERdata to each OS

    does that make sense?
    am I answering questions?


    ------------------------------
    Tom Sarasin
    Maximo Designer
    IBM
    (978) 899-2592
    ------------------------------



  • 9.  RE: How to use additional object structure in enterprise service

    Posted Wed December 09, 2020 05:33 PM
    Hi Tom,
    Yes, that is exactly what I am planning to achieve to use multiple object structure in ES. The 2 key points I am stuck at for this approach are:
    1. How to break down inbound ES payload and assign to WO and SR object structures in preprocess method in ES userexit? What's the final xml should look like in erData? Will something like the below structure:
    <?xml version="1.0" encoding="UTF-8"?>
    <max:SyncMXRWO xmlns:max="http://www.ibm.com/maximo">
      <max:MXRWOSet>
        <max:WORKORDER>
        ....
        </max:WORKORDER>
      </max:MXRWOSet>
      <max:MXRSRSet>
        <max:SR>
        ....
        </max:SR>
      </max:MXRSRSet>
    </max:SyncMXRWO>​

    2. How to get ticketID which created in SR object structure and assign it to RelatedID in Work Order Object Structure?


    ------------------------------
    Jacky Qiu
    Technical EAM Director
    Stellar Services
    Atlanta, GA
    ------------------------------



  • 10.  RE: How to use additional object structure in enterprise service

    Posted Thu December 10, 2020 09:09 AM
    So you're exit class with the SR object structure would have to build a payload like this

    <max:MXRSRSet>
        <max:SR>
        ....
        </max:SR>
      </max:MXRSRSet>​

    but this process will not return the autogenerated ticketid.  So you are going to have to query for it after the insert process.  if your erdata has a unique identifier then populate that in externalrefid column or some other unused column.  The value must be unique for all SRs.  You then would do a GET to retrieve ticketid using the externalrefid value.  I'm thinking (but not positive) that you could set the ticketid in the erdata and then use that when building the WO payload in the ES User Exit

    ------------------------------
    Tom Sarasin
    Maximo Designer
    IBM
    (978) 899-2592
    ------------------------------



  • 11.  RE: How to use additional object structure in enterprise service

    Posted Thu December 10, 2020 09:40 AM