EdaParseMessage@1
Node EdaParseMessage@1 parses a stored EDA status message (raw XML) into an EdaMessageInfo object. The EdaMessageInfo tells whether the message finishes its process and whether the process was successful, and contains the response codes, consent data and, for metering point lists, the metering points.
The node is usually used for messages that were received with EdaReceiver@1 and stored as entities; the message type, the raw XML and the RtIds are read from a query result.
Adapter Prerequisites
Node Configuration
For fields path, targetPath, targetValueWriteMode, and targetValueKind, see Overview.
transformations:
- type: EdaParseMessage@1
messageRtIdPath: $.key.RtId # RtId of the stored message entity
messageTypePath: $.key.Values[0] # EDA message code, e.g. ANTWORT_PT
processRtIdPath: $.key.Values[1] # optional: RtId of the process the message belongs to
rawMessagePath: $.key.Values[2] # raw XML of the message
targetPath: $.EdaMessage
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
messageRtIdPath | string | Yes | - | Path to the RtId of the stored EDA message entity |
messageTypePath | string | Yes | - | Path to the EDA message code, e.g. ANTWORT_PT |
rawMessagePath | string | Yes | - | Path to the raw XML of the message |
processRtIdPath | string | No | - | Path to the RtId of the EDA process the message belongs to |
targetPath | string | No | $ | Path where the EdaMessageInfo is written |
Behavior
- If the message RtId, the message type or the raw XML is missing in the data context, the node writes nothing and the pipeline continues.
- A message type that is not listed in Supported message types fails the node (
Not supported message type). This includes request messages (ANFORDERUNG_*) and consumption records (DATEN_CRMSG); use ParseConsumptionRecord@1 or AggregateConsumptionRecord@1 for consumption records. - A
CMNotificationwith more than oneResponseDataelement is not supported and fails the node.
Output
The node writes an EdaMessageInfo object (PascalCase property names in the data context):
| Property | Description |
|---|---|
MessageRtId | RtId read from messageRtIdPath |
ProcessRtId | RtId read from processRtIdPath, if configured |
MessageType | EDA message code from the message |
MessageId | Message id |
ConversationId | Conversation id; the same for all messages of one process |
CreationDate | DocumentCreationDateTime of the routing header |
ResponseCode | Response code(s); several codes are separated by a space. For CMRevoke the reason key |
ResponseInfo | Description of the response code(s); several descriptions are separated by a line break. For CMRevoke the revocation reason |
MeteringPointNumber | Metering point (CMNotification, CMRevoke) |
ConsentId | Consent id (CMNotification, CMRevoke) |
ConsentEnd | End of the consent (CMRevoke) |
PortalApprovalUrl | Approval URL of the customer portal (CMNotification) |
MeteringPoints | Metering points of an ECMPList message (see below) |
IsSuccessfulProcess | true/false if the message decides the result of the process, otherwise null |
FinishProcess | true if the message finishes the process |
For ECMPList messages, MeteringPoints contains one entry per metering point with MeteringPointNumber, ConsentId, ActivatedSince, DeactivatedSince, ParticipationFactor, Direction (0 unknown, 1 consumption, 2 production), ProductionType (derived from the TechCode), TechCode, FuelCode and TimePeriods. Per listing, the values come from the time slice with the latest DateFrom. If a metering point is listed several times, ConsentId, ActivatedSince, DeactivatedSince and ParticipationFactor are taken from the listing with the most recent activation, and every listing is added to TimePeriods (ActivatedSince/DeactivatedSince in UTC, an open end is 9999-12-31). An empty metering point list is valid and results in an empty MeteringPoints array.
Supported message types
| Message type | EDA schema | IsSuccessfulProcess | FinishProcess |
|---|---|---|---|
ANTWORT_PT | CPNotification | true | true |
ABLEHNUNG_PT | CPNotification | false | true |
ABLEHNUNG_CRMSG | CPNotification | null | false |
ABLEHNUNG_ECP | CPNotification | false | true |
ABLEHNUNG_CMP | CPNotification | false | true |
ANTWORT_CPF | CPNotification | true | true |
ABLEHNUNG_CPF | CPNotification | false | true |
ANTWORT_ECON | CMNotification | null | false |
ZUSTIMMUNG_ECON | CMNotification | null | false |
ABLEHNUNG_ECON | CMNotification | false | true |
ABBRUCH_ECON | CMNotification | false | true |
ANTWORT_CCMO | CMNotification | null | false |
ZUSTIMMUNG_CCMO | CMNotification | true | true |
ABLEHNUNG_CCMO | CMNotification | false | true |
ANTWORT_CCMS | CMNotification | true | true |
ABLEHNUNG_CCMS | CMNotification | false | true |
ABSCHLUSS_ECON | ECMPList | true | true |
SENDEN_ECP | ECMPList | true | true |
ANTWORT_CMP | ECMPList | true | true |
AUFHEBUNG_CCMS | CMRevoke | true | true |
AUFHEBUNG_CCMC | CMRevoke | true | true |
AUFHEBUNG_CCMI | CMRevoke | true | true |
The message type is compared case-insensitively. The schema versions used by the adapter are CPNotification 01.13, CMNotification 01.20, ECMPList 01.20 and CMRevoke 01.10.
The configuration properties are documented in the API reference, the output in EdaMessageInfo.
Complete sample of pipeline configuration
This sample loads unprocessed messages with a query, parses them, determines the newest message per process and updates the process entities.
triggers:
- type: FromPolling@1
interval: 00:02:00
transformations:
- type: GetQueryById@1
targetPath: $.query
queryRtId: 000000000000000000000001 # query returning MessageType, ProcessRtId, RawMessage
- type: ForEach@1
iterationPath: $.query.Rows
mergePath: $.EdaMessage
targetPath: $.EdaMessages
transformations:
- type: EdaParseMessage@1
messageRtIdPath: $.key.RtId
messageTypePath: $.key.Values[0]
processRtIdPath: $.key.Values[1]
rawMessagePath: $.key.Values[2]
targetPath: $.EdaMessage
- type: ExtractProcesses@1
path: $.EdaMessages
targetPath: $.EdaProcesses
- type: ForEach@1
iterationPath: $.EdaProcesses
mergePath: $.update
targetPath: $.updates
transformations:
- type: CreateUpdateInfo@1
targetPath: $.update
updateKind: UPDATE
ckTypeId: Basic.Energy/EdaProcess
rtIdPath: $.key.ProcessRtId
attributeUpdates:
- attributeName: Finished
attributeValueType: Boolean
valuePath: $.key.FinishProcess
- attributeName: Success
attributeValueType: Boolean
valuePath: $.key.IsSuccessfulProcess
- attributeName: ResponseCode
attributeValueType: String
valuePath: $.key.ResponseCode
- type: ApplyChanges@2
entityUpdatesPath: $.updates