BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Calling ODM service in BAW with Authentication

    Posted 02/09/24 11:48 AM
      |   view attached

    Hello All  

    We are getting an error(attachment added) when calling ODM service from BAW. 

    Any pointers what needs to be checked when calling the same from Postman it's successful response .



    ------------------------------
    Gona Deepak
    ------------------------------


  • 2.  RE: Calling ODM service in BAW with Authentication

    Posted 02/12/24 09:34 AM

    Hello,

    Based on the timestamps of your messages, the first error above is not the HTTP 500 error, it is the unassigned variable that contains agencyState. This is usually because the variable was not properly initialized or not properly passed into the service that you are running. Once this is addressed, I would ask a couple of questions on your implementation, to see how you are building the REST API:

    • Did you export an openAPI spec file from ODM to build the REST API?
    • Are you using the built in BAW capabilities to build a service or are you using JavaScript to build the REST API? The usual style is to export the openAPI spec from ODM and then import this to BAW. Usually, not always, BAW will build a REST service for you 


    ------------------------------
    Stuart Jones
    Business Automation Technical Specialist
    IBM
    Cedar Rapids IA
    630 390 4436
    ------------------------------



  • 3.  RE: Calling ODM service in BAW with Authentication
    Best Answer

    Posted 02/12/24 04:27 PM

    Thank You Stuart for the response .

    We are using the JavaScript capabilities to built the REST API, as we were trying to explore the BAW capabilities the BASIC authentication was not working in our case - not sure what was the use there.

    But for the above problem - we resolved the issue .

    It's the request issue on BAW side never knew that a body has to be prefixed with request, I think the postman does it for us automatically but in BAW we have to manually add it.
    request.parameters = {*'body'*: { 'parameter1' : 'value'}}

    'body' has to be prefixed along with parameters when doing rest call.

    Thanks,
    Deepak



    ------------------------------
    Gona Deepak
    ------------------------------