EdaReceiver@1
Node EdaReceiver@1 receives EDA messages from the HttpAdapter of the Ponton X/P Messenger and appends them to an array in the data context.
The node fetches the messages one after the other, starting after the message id lastReceivedId. It stops when the HttpAdapter has no more messages (HTTP 404), when take messages have been received, or after the first message if getAllMessages is false.
Adapter Prerequisites
Node Configuration
For fields path, targetPath, targetValueWriteMode, and targetValueKind, see Overview.
transformations:
- type: EdaReceiver@1
targetPath: $.messages # array the received messages are appended to
getAllMessages: true # receive up to 'take' messages (default: true)
take: 25 # maximum number of messages per execution (default: 20)
lastReceivedId: 0 # id of the last received message (default: 0)
# host, user, password: optional, override the adapter configuration
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
targetPath | string | No | $ | Path of the array the received messages are appended to |
getAllMessages | bool | No | true | If false, only the next message is received |
take | int | No | 20 | Maximum number of messages received in one execution if getAllMessages is true |
lastReceivedId | int | No | 0 | Id of the last received message; the node continues with the next message |
host | string | No | adapter configuration | Overrides Host of the adapter configuration |
user | string | No | adapter configuration | Overrides User of the adapter configuration |
password | string | No | adapter configuration | Overrides Password of the adapter configuration |
isSimulationMode | bool | No | adapter configuration | Overrides IsSimulationMode of the adapter configuration; has no effect on receiving |
The received messages are always appended to the array at targetPath; targetValueWriteMode, targetValueKind and documentMode are ignored by this node.
Output
Each received message is written as an EdaMessage object:
| Property | Description |
|---|---|
Headers | Routing headers of the HttpAdapter: Id (position in the inbound queue), MessageId, ConversationId, SenderId, ReceiverId, MessageType (EDA message code, e.g. ANTWORT_PT), MessageVersion, Schemaset |
Message | The message deserialized according to its EDA schema. For consumption records (DATEN_CRMSG) the energy data and for ECMPList messages the metering point list are removed here and only kept in RawContent |
RawContent | The original XML of the message |
The data context uses PascalCase property names for the output, e.g. $.messages[0].Headers.ConversationId.
Runtime behavior
-
An HTTP error other than 404 (no more messages) fails the node.
-
A message with a message code that the adapter does not know fails the node (
Unknown message type). The node knows these message codes:Schema Message codes CMRequest ANFORDERUNG_CCMO,ANFORDERUNG_ECONCMNotification ABLEHNUNG_CCMO,ANTWORT_CCMO,ZUSTIMMUNG_CCMO,ABLEHNUNG_ECON,ANTWORT_ECON,ZUSTIMMUNG_ECON,ABBRUCH_ECON,ABLEHNUNG_CCMS,ANTWORT_CCMSCPRequest ANFORDERUNG_PT,ANFORDERUNG_CMPCPNotification ABLEHNUNG_PT,ANTWORT_PT,ABLEHNUNG_CRMSG,ABLEHNUNG_ECP,ABLEHNUNG_CMP,ABLEHNUNG_CPF,ANTWORT_CPFConsumptionRecord DATEN_CRMSGECMPList ABSCHLUSS_ECON,SENDEN_ECP,ANTWORT_CMPCMRevoke AUFHEBUNG_CCMI,AUFHEBUNG_CCMS,AUFHEBUNG_CCMCOnly a subset of these is evaluated by EdaParseMessage@1; consumption records (
DATEN_CRMSG) are processed by the consumption record nodes, e.g. ParseConsumptionRecord@1.
The configuration properties are documented in the API reference.
Complete sample of pipeline configuration
This sample polls the HttpAdapter every minute, splits long consumption records into daily chunks and stores every message as an entity.
triggers:
- type: FromPolling@1
interval: 00:01:00
transformations:
- type: EdaReceiver@1
getAllMessages: true
take: 25
targetPath: $.messages
- type: SplitConsumptionRecord@1
path: $.messages
targetPath: $.messages
maxHours: 24
- type: ForEach@1
iterationPath: $.messages
mergePath: $.update
targetPath: $.updates
transformations:
- type: CreateUpdateInfo@1
targetPath: $.update
updateKind: INSERT
ckTypeId: Basic.Energy/EdaMessage
rtIdPath: $.rtId
generateRtId: true
attributeUpdates:
- attributeName: MessageType
attributeValueType: String
valuePath: $.key.Headers.MessageType
- attributeName: ConversationId
attributeValueType: String
valuePath: $.key.Headers.ConversationId
- attributeName: RawMessage
attributeValueType: String
valuePath: $.key.RawContent
- type: ApplyChanges@2
entityUpdatesPath: $.updates