Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Maximo object structure outbound processing

    Posted Fri October 25, 2024 06:10 AM

    Hi,

    When we call any OS based API we may get one or more records in response (there may be one or more parent mbos/child mbos). When we get a response, outbound processing class/scripts are called. Is there any method or any way by which we read the response and run a logic only once even if the response has multiple mbos in response?

    Thanks,

    Suhas



    ------------------------------
    Suhas Joshi
    ------------------------------


  • 2.  RE: Maximo object structure outbound processing

    Posted Sun October 27, 2024 01:42 AM

    Hi Suhas,

    There are many ways you can do it but I would suggest look at the Condition expression application and looks at IBM code how they implemented "Always Evaluate", because they use some sort of caching mechanism to identify where to refer to cache or do it anyways.

    You can also do some sort of inmemory cache, might be an interesting but not more than a few lines of code.

    Regards,

    Aniruddh



    ------------------------------
    Aniruddh Panvalkar
    ------------------------------



  • 3.  RE: Maximo object structure outbound processing

    Posted Sun October 27, 2024 01:50 AM

    Hi Suhas, 

    https://surenmaximoworks.blogspot.com/2024/01/outbound-object-structure-integration.html

    We have a predefined set of rules on Object Structure OS processing scripts.

    Please let me know on what is the business logic you would like to run on the main mbo only once.

    Thanks,

    Suren



    ------------------------------
    Surender Balasundaram
    ------------------------------



  • 4.  RE: Maximo object structure outbound processing

    Posted Sun October 27, 2024 02:02 AM

    Hi Surender, 

    thanks for your response. I have already looked at the methods in the outbound processing class but none would satisfy the requirement that I have.

    for example, if I have an OS with both PO and POLINE and consider I am getting more than one records of PO and POLINE in response. Even though there are multiple records, I need to say that I have accessed these mbos and need to write a specific logic only once. I cannot use these methods and write my logic since they will be called multiple times since response has multiple mbo records. Hope the requirement is clear now.



    ------------------------------
    Suhas Joshi
    ------------------------------



  • 5.  RE: Maximo object structure outbound processing

    Posted Sun October 27, 2024 02:40 AM

    Hi Suhas,

    I understand that if an external system calls an API on OS to get a list of PO/POLINE records. I assume that the output has 10 POs with its related POLINEs in the response message from Maximo.  

    Now, please tell me on what is business logic you would like to run & on which system (Maximo or external system) & which MBOs.

    One of the requirement that I can think of is to set the response date back to all POs. you need to create a publish channel & update it using User exit. 

    We can also create a parent custom object structure like  C_POOUT/PO/POLINE, where in the sender system can set a query on C_POOUT which will be used as a relationship against a PO.  

    I don't know on how to achieve it using OS API. Can we try it out using Publish Channel.

    Thanks and regards,

    Suren



    ------------------------------
    Surender Balasundaram
    ------------------------------



  • 6.  RE: Maximo object structure outbound processing

    Posted Sun October 27, 2024 02:51 AM

    Hi Surender,

    All our APIs are OS based. When this API is accessed and a response is received, we need to write a line in a logfile (within Maximo) that PO and POLINE record has been accessed. Logic for writing to a log file is already in place but we want to call that only once so that only one line is written to the log file for each response.



    ------------------------------
    Suhas Joshi
    ------------------------------



  • 7.  RE: Maximo object structure outbound processing

    Posted Sun October 27, 2024 07:20 PM
    Edited by Surender Balasundaram Sun October 27, 2024 07:27 PM

    Hi Suhas, 

    https://ibm-maximo-dev.github.io/maximo-autoscript-documentation/rest/osaction/

    Could you please try OSACTION script to invoke the existing script to write log. 

    https://maximodevsupport.blogspot.com/2020/02/maximo-rest-api-example-change.html

    Thanks,

    Suren



    ------------------------------
    Surender Balasundaram
    ------------------------------



  • 8.  RE: Maximo object structure outbound processing

    Posted Sun October 27, 2024 11:01 PM

    Hi Surender,

    thanks for the inputs again. My API is always GET one. Whenever the API is called and response is received, I need to write in the log saying read operation has been performed on so and so object. Also, with action script, the action needs to be specified in the url which I guess we don't do in case of GET calls.



    ------------------------------
    Suhas Joshi
    ------------------------------