I am getting the below response from Integration which is of type HttpResponse
[statusLine=HTTP/1.1 200 OK, statusCode=200, headers=[object Object], contentType=application/json; charset=utf-8, body={"jobId":"01091664F27E4771A9B92AEA0CC577ED"}].
I need to get the JobId value from the above and i ll have to map it to a process variable. To achieve this, i used an expression rule and used the below code:
if(a!isNotNullOrEmpty(ri!integrationResponse),a!fromJson(index(ri!integrationResponse, "body", null)),{})
It resulted in "[jobId:01091664F27E4771A9B92AEA0CC577ED]" but i only need the JobId value from it. I tried various functions but nothing seems to be working.
Can someone please suggest on how to proceed with this?
Discussion posts and replies are publicly visible
Hi poojithak2926 ,
I would suggest you to create a rule and use the integration in the following way:rule!ABC_FormatData(ri!response : ri!integrationResponse)
a!localVariables( local!data: split( index( ri!response, "body", {} ), ":" ), local!jobId:index(local!data, 2, {}), left(local!jobId,count(char(code(local!jobId)))-1) )