SWIFT Module 7.1 SP10.July 2020 | Configuring SWIFT Module for Message Exchange over SAA | Configuring Processing Rules to Send and Receive SWIFT FIN Messages | Sending Messages to SWIFT | Assigning the Processing Rule | Step 3: Create a Service to Map to the DFD Format
 
Step 3: Create a Service to Map to the DFD Format
Create a service to map the back-end document to webMethods DFD format using the following logic:
1. Retrieve the back-end system document content from the BizDocEnvelope and generate an IData object by invoking the wm.tn.doc.xml:bizdocToRecord service.
2. Map data from the back-end system document to webMethods DFD format for the {B4} block of the SWIFT FIN message.
3. Convert the webMethods DFD format IData object to an XML String by invoking the pub.xml:documentToXMLString service.
4. Convert the XML String to bytes by invoking the pub.string:stringToBytes service.
5. Invoke the wm.tn.doc:addContentPart service to add the bytes to the BizDocEnvelope as a new content part. When you add the content part, you must name the content part DFD Data.