com.apama.cumulocity
Event GenericResponse
Zero or more GenericResponse events are sent for each GenericRequest on the GenericResponse.SUBSCRIBE_CHANNEL channel, followed by a GenericResponseComplete.
The query must return a JSON object.
response.body erroneously contains a single-element dictionary containing the response from the request. We now recommend that instead of using response.body you call the getBody action, which returns the response without the wrapping dictionary.
It is possible to get this behaviour directly in response.body by setting a correlator property on startup: analyticsBuilder.genericResponse.body=payload.body. This may be needed for compatibility with applications running as a Streaming Analytics application in Cumulocity IoT 10.9 or later if the matching tenant option has been set there.
-
Since:
- 10.5.0.0
Constant summary |
string | CHANNEL := "cumulocity.generic.response"
The channel to which Generic responses are sent from the transport.
-
Deprecated:
-
[This channel constant has been deprecated. Use SUBSCRIBE_CHANNEL instead.]
|
string | SUBSCRIBE_CHANNEL := "cumulocity.generic.response"
The channel to which Generic responses are sent from the transport. |
Member summary |
integer | reqId
Request identifier from the original GenericRequest. |
any | body
The response body, typically a dictionary or sequence. It is recommended to use getBody() instead. |
Action summary |
any |
getBody()
Return the response body as returned by the response. Typically a dictionary or sequence. |
CHANNEL
string CHANNEL := "cumulocity.generic.response"
-
Deprecated:
-
[This channel constant has been deprecated. Use SUBSCRIBE_CHANNEL instead.]
The channel to which Generic responses are sent from the transport.
SUBSCRIBE_CHANNEL
string SUBSCRIBE_CHANNEL := "cumulocity.generic.response"
The channel to which Generic responses are sent from the transport.
-
Since:
- 10.5.2.0
body
any body
The response body, typically a dictionary or sequence. It is recommended to use getBody() instead.
reqId
integer reqId
Request identifier from the original GenericRequest.
getBody
any getBody()
Return the response body as returned by the response. Typically a dictionary or sequence.
Unlike the body member this will not be contained in a single-element dictionary wrapping the actual response.
-
Returns:
- The response body.
-
Since:
- 10.7.1.3