Maximo

Maximo

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

 View Only
  • 1.  create workorder/woactivity in a single POSTMAN call

    Posted Fri March 31, 2023 09:02 AM

    Hi, I am creating workorder in post call using the below payload

    {
      "siteid": "TEST",
      "description" : "Test",
      "worktype" : "TEST",
        "woactivity":[
       {
          "taskid" : "10",
          "description" : "Task 10"
       },
       {
          "taskid" : "20",
          "description" : "Task 20"
       }
       ]
    }

    using the relationship WORKORDER, WORKORDER/WOACTIVITY in Object Structure XXXX level.
    Now i have to save the response(WONUM, WOACTIVTY.WONUM) in some middleware,
    My issues are 

    I can't get the WONUM,WOACTIVITY.WONUM in a single response message. so I enabled "Exclude Parent Attribute" from "Advanced Configuration". if i enabled it throws the below error 

    {
        "Error": {
            "errorattrname": "wonum",
            "extendedError": {
                "moreInfo": {
                    "href": "https://--------------/maximo/api/error/messages/BMXAA4129E"
                }
            },
            "errorobjpath": "workorder/woactivity",
            "correlationid": "2",
            "errattrvalue": null,
            "reasonCode": "BMXAA4129E",
            "message": "BMXAA4129E - The record for Site=TD, Activity=XXXXXX already exists. Ensure that the key value for the given record is unique.",
            "statusCode": "400"
        }
    }

    Please help me to achieve this

    Thanks,
    Karthik Krishnamurthy



    ------------------------------
    karthik krishnamurthy
    ------------------------------

    #Maximo
    #MaximoIntegrationandScripting


  • 2.  RE: create workorder/woactivity in a single POSTMAN call

    Posted Tue April 04, 2023 03:35 AM

    Hi Karthik,

    I think the "Exclude Parent Key Attribute" should be checked when you are creating Parent/Child Structure (WO/WOACTIVITY) where you don't have idea of what the parent and task workorder number will be. Also, since this checked, you won't be able to get the key attribute in the response payload of child (Task) even if property set to *.

    Don't think Maximo returns the task wonum through the Property header attribute when you are trying to create multiple Tasks for a parent. It only works when you have only one task. 



    ------------------------------
    Subhransu Sekhar Sahoo
    ------------------------------



  • 3.  RE: create workorder/woactivity in a single POSTMAN call

    Posted Wed April 12, 2023 08:46 AM

    Hi Subhransu,

    Thank you for your response. The error is coming once i unchecked "Exclude Parent Key attribute" in the object structure level, but the reason i am asking is customer needs WORKORDER.WONUM and WOACTIVITY.WONUM in the response message.



    ------------------------------
    karthik krishnamurthy
    ------------------------------



  • 4.  RE: create workorder/woactivity in a single POSTMAN call

    Posted Fri April 14, 2023 01:38 PM

    HI Karthik,

    You can get only the wonum of workorder and wonum of a single task. If you are creating more than one task, the response doesn't provide the all task wonum.




    ------------------------------
    Subhransu Sekhar Sahoo
    ------------------------------



  • 5.  RE: create workorder/woactivity in a single POSTMAN call

    Posted Fri April 14, 2023 02:16 PM

    Hi Karthik,

    Are you trying to create a single child Task or multiple tasks for a parent WO through the inbound message? if single, it will provide you the tasknum, if multiple it doesn't provide I think.



    ------------------------------
    Subhransu Sekhar Sahoo
    ------------------------------