BPM, Workflow, and Case

 View Only

Accept JSON Array as input to BPM Service

  • 1.  Accept JSON Array as input to BPM Service

    Posted Tue November 22, 2022 01:50 PM
    Hi Team,

    We need to expose a BPM service(REST) which accepts JSON Arrays . However , it looks like we are only allowed in BAW to accept JSON Object.

    Ex: ['name1','name2','name3']  - Supposed to accept this format, however, the only input  works is {'ObjName':['name1','name2','name3'] } 

    Our Service Input type is : List Of ObjName (We also tried 'ANY' type)

    We get the below error when we pass JSON array. 

    00000298 RestHelper E com.ibm.bpmstd.engine.api.rest.util.RestHelper handleExceptionType com.ibm.bpm.wle.api.InvalidRequestBodyException: CWTBG0596E: The request body is invalid.The reported message is: 'Expecting '{' on line 1, column 2 instead, obtained token: 'Token: [''

    Is there way we create BAW service which accepts JSON arrays without any manipulations?

    ------------------------------
    Prasad V
    ------------------------------