SendNotification@1
Node SendNotification@1 creates an EDA notification (CPNotification 01.13) and sends it to a market participant through the HttpAdapter of the Ponton X/P Messenger. It is used to answer a received message, e.g. to reject a consumption record with ABLEHNUNG_CRMSG.
Adapter Prerequisites
Node Configuration
For fields path, targetPath, targetValueWriteMode, and targetValueKind, see Overview.
transformations:
- type: SendNotification@1
messageCode: ABLEHNUNG_CRMSG # EDA message code of the notification
responseCode: 57 # response code of the notification
senderAddressPath: $.message.Receiver # our market partner id (receiver of the original message)
receiverAddressPath: $.message.Sender # sender of the original message
originalMessageIdPath: $.message.MessageId # message id of the message that is answered
conversationIdPath: $.message.ConversationId # optional: conversation of the original message
targetPath: $.notification
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
messageCode | string | Yes¹ | - | EDA message code of the notification, e.g. ABLEHNUNG_CRMSG |
responseCode | int | No | 0 | Response code written to the response data of the notification |
senderAddressPath | string | Yes¹ | - | Path to the market partner id of the sender of the notification |
receiverAddressPath | string | Yes¹ | - | Path to the market partner id of the receiver of the notification |
originalMessageIdPath | string | Yes¹ | - | Path to the message id of the message that is answered |
conversationIdPath | string | No | - | Path to the conversation id; without it a new conversation id is generated |
targetPath | string | No | $ | Path where the sent notification is written |
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; if true the notification is sent with document mode SIMU |
¹ Not marked as required in the schema, but enforced at runtime: if senderAddressPath, receiverAddressPath, originalMessageIdPath or messageCode is not configured, the node fails with Invalid configuration. If the sender, receiver or original message id cannot be found in the data context, the node fails with Invalid input data.
Behavior
- The notification is always created for the sector electricity.
- The node writes the created
CPNotificationobject (withMarketParticipantDirectoryandProcessDirectory) totargetPath, not the HTTP result of the HttpAdapter. An HTTP error of the HttpAdapter does not fail the node.
The configuration properties are documented in the API reference.
Complete sample of pipeline configuration
This sample rejects stored consumption records that cannot be assigned to a metering point.
triggers:
- type: FromPolling@1
interval: 00:05:00
transformations:
- type: GetQueryById@1
targetPath: $.query
queryRtId: 000000000000000000000002 # unassigned DATEN_CRMSG messages
- type: ForEach@1
iterationPath: $.query.Rows
targetPath: $.notifications
transformations:
- type: SendNotification@1
messageCode: ABLEHNUNG_CRMSG
responseCode: 57
senderAddressPath: $.key.Values[0] # receiver of the original message
receiverAddressPath: $.key.Values[1] # sender of the original message
originalMessageIdPath: $.key.Values[2]
conversationIdPath: $.key.Values[3]
targetPath: $.notification