The SWIFT Sample Project (prjSwift_JCD_MFVRAndBICPlusIBAN) demonstrates the validation features of the SWIFT OTD Library for the combination of MFVR and BIC/IBAN. Specifically, this Project employs the Java-based Validation Collaborations and their definitions.
The Project uses a common process infrastructure to identify and isolate invalid messages. The process keeps these messages readily available for further use. It also passes valid messages on to their destinations. .
The flow of the Project is as follows:
The inbound File eWay subscribes to an external ”input” directory. The eWay accepts an MT_541 message and publishes it to the Service1 Collaboration.
The CopyCollab1 service (CopyCollaboration) unmarshals the message, copies all of the data fields (to demonstrate how to copy the data fields), marshals the message to a String and publishes the message to a JMS Queue.
The ValidateMT_541_Modified Collaboration accepts the message from the JMS Queue, validates the messages for MFVR and then for BICPlusIBAN, and publishes it to the ValidMessage Queue if the message is valid, or to the InvalidMessages if the message is not valid.
The PrintValidMessages Collaboration accepts the valid messages, prints out the message and sends the message to the outbound File eWay.
The PrintInvalidMessages Collaboration accepts the invalid messages, prints that the message is invalid and lists any errors. It then sends that message to the outbound File eWay.
The outbound File eWay publishes the messages to an external folder as either Swift2008_JCD_MFVRAndBICPlusIBAN_Valid_output1.dat or Swift2008_JCD_MFVRAndBICPlusIBAN_Invalid_output1.dat.
You must name the source (input) and destination (output) file directories in the setting property settings for the Project’s File eWays. See the File eWay Intelligent Adapter User’s Guide for details.
Sample valid and invalid input messages are provided with the downloaded sample, as well as examples of valid and invalid output messages. These are located in the SWIFT sample project folder as follows:
input_Swift2008JCD_MFVR_BICPlusIBAN_Validmt541.txt.~in: sample valid message input file
input_Swift2008JCD_MFVR_BICPlusIBAN_Invalidmt541.txt.~in: sample invalid message input file
Swift2008_JCD_MFVRAndBICPlusIBAN_Valid_output1.dat: example of sample valid message output
Swift2008_JCD_MFVRAndBICPlusIBAN_Invalid_output1.dat: example of sample invalid message output
Also, see Validation Operation for a more detailed explanation of the validation operation.