Skip to main content

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
PropertyTypeRequiredDefaultDescription
messageRtIdPathstringYes-Path to the RtId of the stored EDA message entity
messageTypePathstringYes-Path to the EDA message code, e.g. ANTWORT_PT
rawMessagePathstringYes-Path to the raw XML of the message
processRtIdPathstringNo-Path to the RtId of the EDA process the message belongs to
targetPathstringNo$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 CMNotification with more than one ResponseData element is not supported and fails the node.

Output​

The node writes an EdaMessageInfo object (PascalCase property names in the data context):

PropertyDescription
MessageRtIdRtId read from messageRtIdPath
ProcessRtIdRtId read from processRtIdPath, if configured
MessageTypeEDA message code from the message
MessageIdMessage id
ConversationIdConversation id; the same for all messages of one process
CreationDateDocumentCreationDateTime of the routing header
ResponseCodeResponse code(s); several codes are separated by a space. For CMRevoke the reason key
ResponseInfoDescription of the response code(s); several descriptions are separated by a line break. For CMRevoke the revocation reason
MeteringPointNumberMetering point (CMNotification, CMRevoke)
ConsentIdConsent id (CMNotification, CMRevoke)
ConsentEndEnd of the consent (CMRevoke)
PortalApprovalUrlApproval URL of the customer portal (CMNotification)
MeteringPointsMetering points of an ECMPList message (see below)
IsSuccessfulProcesstrue/false if the message decides the result of the process, otherwise null
FinishProcesstrue 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 typeEDA schemaIsSuccessfulProcessFinishProcess
ANTWORT_PTCPNotificationtruetrue
ABLEHNUNG_PTCPNotificationfalsetrue
ABLEHNUNG_CRMSGCPNotificationnullfalse
ABLEHNUNG_ECPCPNotificationfalsetrue
ABLEHNUNG_CMPCPNotificationfalsetrue
ANTWORT_CPFCPNotificationtruetrue
ABLEHNUNG_CPFCPNotificationfalsetrue
ANTWORT_ECONCMNotificationnullfalse
ZUSTIMMUNG_ECONCMNotificationnullfalse
ABLEHNUNG_ECONCMNotificationfalsetrue
ABBRUCH_ECONCMNotificationfalsetrue
ANTWORT_CCMOCMNotificationnullfalse
ZUSTIMMUNG_CCMOCMNotificationtruetrue
ABLEHNUNG_CCMOCMNotificationfalsetrue
ANTWORT_CCMSCMNotificationtruetrue
ABLEHNUNG_CCMSCMNotificationfalsetrue
ABSCHLUSS_ECONECMPListtruetrue
SENDEN_ECPECMPListtruetrue
ANTWORT_CMPECMPListtruetrue
AUFHEBUNG_CCMSCMRevoketruetrue
AUFHEBUNG_CCMCCMRevoketruetrue
AUFHEBUNG_CCMICMRevoketruetrue

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