Seven Stars

Unique Identifier for each Request

Is there any "unique" identifier I can capture for all requests received via the tRestRequest? I tried using

((String)globalMap.get("tRESTRequest_1_CORRELATION_ID"))

value, however, it returns a null value.

 

In the log output, I see the following. How can I capture the ID field from here? It seems to be unique tying the request and response together. Any help is appreciated.

INFO: Inbound Message
----------------------------
ID: 2
Address: http://localhost:8088/
Http-Method: GET
--------------------------------------
INFO: Outbound Message
---------------------------
ID: 2
Response-Code: 200
Content-Type: application/json
Headers: {Content-Type=[application/json], Date=[Wed, 01 Nov 2017 15:43:28 GMT]}

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Twelve Stars

Re: Unique Identifier for each Request

Switch on "Use Business Correlation" in the tRestRequest and you can use the .......

 

((String)globalMap.get("tRESTRequest_1_CORRELATION_ID"))
Rilhia Solutions
3 REPLIES
Twelve Stars

Re: Unique Identifier for each Request

Switch on "Use Business Correlation" in the tRestRequest and you can use the .......

 

((String)globalMap.get("tRESTRequest_1_CORRELATION_ID"))
Rilhia Solutions
Seven Stars

Re: Unique Identifier for each Request

@rhall_2_0 I checked on the "Use Business Correlation" option in tRestRequest. Still, i am getting a null for ((String)globalMap.get("tRESTRequest_1_CORRELATION_ID")).

I am trying to call this after tRestRequest --> tJavaRow

Thanks
Seven Stars

Re: Unique Identifier for each Request

Sorry, false alarm. It works. Turns out I had multiple tRestRequest components (disabled) and the one which was current is tRestRequest_3

I will see how this works for my solution. Thanks again.