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
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | Yes | - | File system path (not a JSON path) of a single EDA XML message or of a folder with *.xml files |
targetPath | string | No | $ | 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
pathis a folder, all*.xmlfiles 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:
MessageTypefromMessageCode,MessageIdandConversationIdfrom theProcessDirectory,SenderIdandReceiverIdfrom theRoutingHeader,MessageVersionfrom theSchemaVersionattribute andSchemasetfrom the XML namespace.Idis a sequence number starting at1. - Each file is turned into an
EdaMessagewithHeaders,MessageandRawContent, 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