Retrieve and Log Request and Response Details from a HTTP Task
Summary: Felix_Lukowski is testing an HTTP Task within a Collibra workflow but faces issues logging the request and response details. Although the Edge Connection setup succeeded, the script to analyze details shows the HTTP response as null and the request URL causes an error due to a missing property. Despite enabling a successful HTTP call, Felix_Lukowski notes the response only contains the body and is unable to log request details. They seek advice on logging more than just the response body and the request details.
Dear Collibra Community,
I am currently trying to test the HTTP Task within a Collibra workflow. Overall, the HTTP task documentation is well described, but I am not receiving a successful response.
The Edge Connection in the Edge Site should be correctly setup since the Test Connections gives Succeeded as feedback.
Hence, I wanted to furtherly review the request and response by analysing the details through a following Script Task.

The Script Task contains the following Script:
loggerApi.info("***********************************")
loggerApi.info("***HTTP Response: ${response_json}***")
loggerApi.info("***HTTP Request: ${RequestUrl}***")
The response_json variable is defined in the Response variable name attribute of the HTTP Task and I assumed that the RequestUrl variable can be used as it is stated in the HTTP task documentation (named in Save request variables).
However, the response is logged with the value null, the RequestUrl does not seem to exist and results into an error. You can find the log here:
INFO c.c.d.c.api.component.LoggerApiImpl - *********************************** [authenticated_id=00000000-0000-0000-0000-000000900003, trace_id=724a6e103e9d571f5c1f9c4cd6c1403e, trace_flags=01, span_id=6fead334445ce819]
INFO c.c.d.c.api.component.LoggerApiImpl - ***HTTP Response: null*** [authenticated_id=00000000-0000-0000-0000-000000900003, trace_id=724a6e103e9d571f5c1f9c4cd6c1403e, trace_flags=01, span_id=769359a9ced1046f]
WARN c.c.d.w.s.g.b.SecureGroovyTaskActivityBehavior - Exception while executing scriptTask1 : groovy script evaluation failed: 'javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: RequestUrl for class: Script21' Trace: scopeType=bpmn, scopeDefinitionKey=hTTPTask, scopeDefinitionId=hTTPTask:17:0196430b-a0df-7198-ae9a-ef8b4f9b4cd2, subScopeDefinitionKey=scriptTask1, tenantId=<empty>, type=scriptTask [authenticated_id=00000000-0000-0000-0000-000000900003, trace_id=724a6e103e9d571f5c1f9c4cd6c1403e, trace_flags=01, span_id=ec8775d825dd69b5]
It would be very helpful to log the request and response details, but I do not understand why the response is null respectively how to log the request.
Does anybody have experience with this or any idea how to resolve this problem?
Best regards, Felix
Felix Lukowski Távora
OP1 year ago · EditedMeanwhile I could manage to enable a successful HTTP call. Hereby I could furtherly figure out, that the response actually only contains the body. Hence, the body of the previous HTTP response was actually null.
However, I would assume when I set the Save response details, that I could log more than just the body. That is still not the case. Also, I still did not manage to log the request details. So, my curiosity remains :)