Skip to main content

EdaReceiverSimulation@1

Node EdaReceiverSimulation@1 reads EDA messages from XML files on the file system of the adapter instead of receiving them from the HttpAdapter. It produces the same EdaMessage output as EdaReceiver@1, so it can replace that node during development and testing when no Ponton X/P Messenger is available.

Adapter Prerequisites​

Node Configuration​

For fields path, targetPath, targetValueWriteMode, and targetValueKind, see Overview.

transformations:
- type: EdaReceiverSimulation@1
path: /data/eda-samples # XML file or folder with *.xml files
targetPath: $.messages # array the messages are appended to
PropertyTypeRequiredDefaultDescription
pathstringYes-File system path (not a JSON path) of a single EDA XML message or of a folder with *.xml files
targetPathstringNo$Path of the array the messages are appended to
note

For this node, path is a file system path on the machine (or in the container) the adapter runs on. The messages are always appended to the array at targetPath.

Behavior​

  • If path is a folder, all *.xml files are read in alphabetical order (case-insensitive). If the path does not exist, the node fails.
  • The routing headers are read from the XML itself: MessageType from MessageCode, MessageId and ConversationId from the ProcessDirectory, SenderId and ReceiverId from the RoutingHeader, MessageVersion from the SchemaVersion attribute and Schemaset from the XML namespace. Id is a sequence number starting at 1.
  • Each file is turned into an EdaMessage with Headers, Message and RawContent, see EdaReceiver@1.
  • A message with an unknown message code fails the node.

The configuration properties are documented in the API reference.

Complete sample of pipeline configuration​

This sample reads synthetic test messages from a folder when the pipeline is executed manually.

triggers:
- type: FromExecutePipelineCommand@1
transformations:
- type: EdaReceiverSimulation@1
path: /data/eda-samples
targetPath: $.messages
- type: SplitConsumptionRecord@1
path: $.messages
targetPath: $.messages