Description
The SWIFTSegmentMergeReceiver merges two or more segmented data files generated from the SegmentDataCreatorReceiver, into one or more SWIFT format files.
Note: The loopCount of the Root Segment Domain determines how many SWIFT files must be generated.
In This Article
- When should this Receiver be used?
- When should this Receiver not be used?
- Are any additional items required to use this Receiver?
- List of Steps to Generate Nested SWIFT File Format
- Receiver Parameters
- Configuration File
- Sample MT940 SWIFT Configuration File
- Example MT940 SWIFT Output File
When should this Receiver be used?
- Any time you want to generate nested SWIFT file output.
When should this Receiver not be used?
- Any time you want to generate another type of nested output.
Are any additional items required to use this Receiver?
- SegmentDataCreatorReceiver- Must be assigned to each Domain, except the Merge Domain.
- Note: The SWIFTSegmentMergeReceiver should only be assigned to the Merge Domain that merges the generated segments.
- Note: The SWIFTSegmentMergeReceiver should only be assigned to the Merge Domain that merges the generated segments.
- Configuration File - Used to determine the XML output format. This is typically named "config.xml", but can be named differently if needed.
- Note: When named differently, the name will also need to be changed for the configName parameter within the Receiver.
- Note: When named differently, the name will also need to be changed for the configName parameter within the Receiver.
List of Steps to Generate Nested SWIFT File Format
- Set up a Project with Domains, Parent-Child Relationships, and Scenarios.
- For each Domain except the Merge Domain, complete the following:
- Assign theSegmentDataCreatorReceiverand configure it accordingly.
- Create a Merge Domain with just an id Attribute
- Note: This may have already been done if Domains were imported.
- Add the SWIFTSegmentMergeReceiver to the Merge Domain and configure it, as discussed in this article.
- Create a Scenario Chain with all Domain Scenarios. Make sure the Merge Scenario is in the last position.
- Create a Configuration File as discussed in this article.
- Download the Scenario Chain to your local computer.
- Download the Configuration file to your local computer.
- Note: The configuration file will need to be placed in the location defined here (see the image below):
- Note: The configuration file will need to be placed in the location defined here (see the image below):
Receiver Parameters
SWIFTSegmentMergeReceiver requires that the following parameters are defined. Items with an asterisk (*) are required.
- outputPath* - Defines the location to store the newly generated SWIFT file(s).
- outputSubDirectory - Defines the prefix name of subdirectories that are auto-created under the outputPath and then appended with a number.
- configName* - Defines the name of the configuration file.
- configPath* - Defines the location where the configuration file is stored.
- configSubDir - Defines the subdirectory under configPath where the configuration file has to be stored.
- segmentPath* - Defines the location where segment files are stored.
- segmentSubDirectory - Defines the subdirectory under segmentPath where segment files are stored.
- filesPerOutputSubDir* - Defines the number of files to be generated in each output directory.
- overrideFileName - Defines the overriding file name.
- deleteOutputSubDir* - Defines whether to delete the outputSubDir or not.
Example of the Receiver Parameter Management Form
Configuration File
The SWIFTSegmentReceiver requires a configuration file to help facilitate the formatting of the data output.
Example Configuration File
The example configuration file below defines the following:
- fileNameSegments- The fileNameSegment tag defines the file naming convention for the SWIFT file that is being generated. E.g.
- Output-1.txt, Output-2.txt, and so on
- segments - The segment files from the segment tag will be loaded and used to create the merged output for CEF.>
- segmentsHierarchy- defines the hierarchical structure of the Domains.
Steps to Create the Configuration File
- Within the Project Dashboard, select the Configuration Management Tab within the Management pane.
- Click the New Configuration button.
- Select the SWIFT configuration type as in the below screenshot. Click the Select button.
- Enter the details and select the Segments/ Domains from the drop-down. This includes the:
- Name - Name used to identify the configuration file within the Project.
- Config File Name - Name the Receiver will look for when generating test data. It should be used in configName parameter for the Receiver.
- Output File Name Format - Defines the format used for the generated output file(s).
- Segment Files- Defines the segments that will be used to create nested Swift output.
- Click the Save button. It will open a new form in the Modal.
- Select the Domain from the drop-down. Selecting a Domain will list down the Attributes.
- Select the Attributes to be included in the final output file, as shown in the below screenshot.
- After adding all the Domains and Attributes, click the Save button.
- As in the screenshot below, a new prompt will open where you can drag and drop the domains to set up segment hierarchy.
- Click Done once finished.
- The configuration will be ready to download. Now you can download this and place it into the directory as given in the resource.
Sample MT940 SWIFT Configuration File
<Config>
<fileNameSegments>
<fileNameSegment segmentType='Constant' value='Output-'/>
<fileNameSegment segmentType='Counter' value='1'/>
<fileNameSegment segmentType='Constant' value='.txt'/>
</fileNameSegments>
<segments>
<segment domainName='Header20' segmentFile='Header20Segment.xml'/>
<segment domainName='Header25' segmentFile='Header25Segment.xml'/>
<segment domainName='Header28C' segmentFile='Header28CSegment.xml'/>
<segment domainName='Header60F' segmentFile='Header60FSegment.xml'/>
<segment domainName='Transaction61' segmentFile='Transaction61Segment.xml'/>
<segment domainName='Transaction86' segmentFile='Transaction86Segment.xml'/>
<segment domainName='Transaction86v1' segmentFile='Transaction86v1Segment.xml'/>
<segment domainName='Footer62F' segmentFile='Footer62FSegment.xml'/>
<segment domainName='Footer64' segmentFile='Footer64Segment.xml'/>
</segments>
<segmentHierarchy>
<segment domainName='Header20'>
<attributes>
<attribute fieldName="recordType"/>
<attribute fieldName="Transaction Reference Number"/>
</attributes>
<segment domainName='Header25'>
<attributes>
<attribute fieldName="recordType"/>
<attribute fieldName="Account Identification"/>
</attributes>
<segment domainName='Header28C'>
<attributes>
<attribute fieldName="recordType"/>
<attribute fieldName="Statement Number"/>
</attributes>
<segment domainName='Header60F'>
<attributes>
<attribute fieldName="recordType"/>
<attribute fieldName="transactionTypeIndicator"/>
<attribute fieldName="date"/>
<attribute fieldName="currency"/>
<attribute fieldName="amount"/>
</attributes>
<segment domainName='Transaction61'>
<attributes>
<attribute fieldName="recordType"/>
<attribute fieldName="Value date"/>
<attribute fieldName="Entry Date"/>
<attribute fieldName="Debit/Credit Mark"/>
<attribute fieldName="Funds Code"/>
<attribute fieldName="Amount"/>
<attribute fieldName="Transaction Type ID code"/>
<attribute fieldName="Customer Reference"/>
<attribute fieldName="Bank Reference"/>
<attribute fieldName="Supplementary Details"/>
</attributes>
<segment domainName='Transaction86'>
<attributes>
<attribute fieldName="recordType"/>
<attribute fieldName="message"/>
</attributes>
</segment>
<segment domainName='Transaction86v1'>
<attributes>
<attribute fieldName="recordType"/>
<attribute fieldName="attr1" nextLine="true"/>
<attribute fieldName="attr2" nextLine="true"/>
<attribute fieldName="attr3" nextLine="true"/>
<attribute fieldName="attr4"/>
</attributes>
</segment>
</segment>
</segment>
</segment>
</segment>
<segment domainName='Footer62F'>
<attributes>
<attribute fieldName="recordType"/>
<attribute fieldName="credit/debit mark"/>
<attribute fieldName="value date"/>
<attribute fieldName="currency"/>
<attribute fieldName="amount"/>
</attributes>
<segment domainName='Footer64'>
<attributes>
<attribute fieldName="recordType"/>
<attribute fieldName="Debit/Credit mark"/>
<attribute fieldName="value date"/>
<attribute fieldName="currency"/>
<attribute fieldName="amount"/>
</attributes>
</segment>
</segment>
</segment>
</segmentHierarchy>
</Config>
Example MT940 SWIFT Output File
:20:0811704295967358 :25:OZCOVYFG9VSLB9F0GBP :28C:49/00001 :60F:D203118GBP3459.05 :61:2002180218CP6458.70NCHGNONREF :61:2002180218CP978.20NCHKNONREF :61:2002180218DP7392.80NCLRNONREF :61:2002180218CP2840.90NCHGNONREF :86:For your inform. IBAN no. :2GGQMVB5VORQMSNXGBP :61:2002180218DP1807.40NCHKNONREF :61:2002180218CP1837.65NCLRNONREF :86:DB Faktura 123456789 Testkunde HOLMENS KANAL 2-12 1192 KOBENHAVN H :61:2002180218DP1440.55NCHGNONREF :61:2002180218DP1429.80NCHKNONREF :61:2002180218CP3042.35NCLRNONREF :61:2002180218DP6080.30NCHGNONREF :86:For your inform. IBAN no. :2GGQMVB5VORQMSNXGBP :62F:D200218GBP2821.35 :64:D200218GBP10.75 :20:9870169180761779 :25:OJUDWGDZFL4PKRUASYP :28C:49/00002 :60F:C203118SYP7827.65 :61:2002180218CP6314.40NCHKNONREF :61:2002180218DP9295.70NCLRNONREF :61:2002180218CP7316.10NCHGNONREF :86:For your inform. IBAN no. :DLRFC4RHSFCX9LL2SYP :61:2002180218DP1319.05NCHKNONREF :61:2002180218DP5901.25NCLRNONREF :61:2002180218DP4932.60NCHGNONREF :61:2002180218CP7652.05NCHKNONREF :86:For your inform. IBAN no. :DLRFC4RHSFCX9LL2SYP :61:2002180218DP3536.10NCLRNONREF :61:2002180218CP2878.80NCHGNONREF :61:2002180218CP5812.70NCHKNONREF :62F:C200218SYP791.40 :64:C200218SYP90.60 :20:8801043501070928 :25:RFBQPFFIB5WBIPRYGIP :28C:49/00003 :60F:D203118GIP609.30 :61:2002180218CP5739.10NCLRNONREF :61:2002180218CP5455.05NCHGNONREF :61:2002180218DP1782.55NCHKNONREF :86:For your inform. IBAN no. :JEW3D7A7H2FWJOILGIP :61:2002180218DP4518.95NCLRNONREF :61:2002180218DP4161.30NCHGNONREF :61:2002180218DP9835.80NCHKNONREF :86:For your inform. IBAN no. :JEW3D7A7H2FWJOILGIP :61:2002180218DP5264.85NCLRNONREF :61:2002180218DP1201.60NCHGNONREF :61:2002180218CP20.20NCHKNONREF :61:2002180218DP9247.85NCLRNONREF :86:For your inform. IBAN no. :JEW3D7A7H2FWJOILGIP :62F:D200218GIP7359.50 :64:D200218GIP25.00