diff --git a/repository/blocks/EnhancedHttpOutputBlock.mon b/repository/blocks/EnhancedHttpOutputBlock.mon index b90f31a..453090e 100644 --- a/repository/blocks/EnhancedHttpOutputBlock.mon +++ b/repository/blocks/EnhancedHttpOutputBlock.mon @@ -17,6 +17,7 @@ using apama.analyticsbuilder.ABConstants; using apama.analyticsbuilder.L10N; using apama.analyticsbuilder.Value; using apama.analyticsbuilder.TimerParams; +using com.apama.util.AnyExtractor; using com.softwareag.connectivity.httpclient.HttpTransport; using com.softwareag.connectivity.httpclient.RequestType; @@ -35,7 +36,7 @@ event HTTPHandler TimerParams tp := TimerParams.relative(0.01).withPayload(res).withPartition(deviceId); base.createTimerWith(tp); - log "Called handleResponse: " + res.payload.data.toString() at INFO; + log "Called handleResponse: " device + "/" + res.payload.data.toString() at INFO; if not res.isSuccess() { log "Unable to connect " +host+". Error code: " + res.statusMessage at WARN; } @@ -186,7 +187,7 @@ event EnhancedHTTPOutput { Request req := transport.createPOSTRequest($parameters.path, data); // Execute the request and pass the callback action. - string deviceId := $activation.partition.toString(); + string deviceId := AnyExtractor($activation.partition).getString(""); log "Processing for partition: " + deviceId at INFO; req.execute(HTTPHandler(deviceId, $parameters.host, $base).handleResponse); $base.profile(BlockBase.PROFILE_OUTPUT); @@ -208,7 +209,7 @@ event EnhancedHTTPOutput { propertyValues[k.valueToString()] := response.payload.data.getEntry(k); } - log "Response parsed: " + propertyValues.toString() at INFO; + log "Response parsed: " + propertyValues.toString() at DEBUG; $setOutput_responseBody($activation, Value(true, $activation.timestamp, propertyValues)); $setOutput_statusCode($activation, response.statusCode.toFloat());