Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Processing Flat Files | Sending and Receiving Flat Files | Modifying Flat File Dictionary Entries, Dictionaries, and Schemas | Modifying an Existing Flat File Dictionary
 
Modifying an Existing Flat File Dictionary
To modify an existing flat file dictionary, you first retrieve from the Integration Server namespace the item that you want to modify. You make your modifications to the data. Delete the dictionary from the namespace before invoking the appropriate service to write the changes back to the Integration Server namespace. The following describes the basic steps to modify a flat file dictionary either using an XML file or mapping data.
Using this method
Follow this procedure
XML File
1. Retrieve the existing information for the flat file dictionary from the Integration Server namespace by invoking the pub.flatFile.generate:findDependants service and write it to an XML file. For more information, see Retrieving Namespace Data to Write to an XML File.
2. Update the data for the flat file dictionary in the XML file. The XML file must conform to the XML schema:
Integration Server_directory \instances\instance_name\packages\WmFlatFile\pub\FFGeneration.xsd
3. Retrieve the contents of the XML file as an XML string. For more information, see Creating a Service that Retrieves the XML File.
4. Delete the existing flat file dictionary from the Integration Server namespace by invoking the pub.flatFile.generate:deleteFFDictionary service.
5. Create the flat file schema in the Integration Server namespace again by invoking the pub.flatFile.generate:saveXMLAsFFDictionary service.
Mapping Data
1. Retrieve the existing information for the flat file dictionary from the Integration Server namespace by invoking the pub.flatFile.generate:findDependants service. The data is returned as an XML string in the FFXML variable.
2. To convert the XML string in the FFXML variable to an IData object:
a. Invoke the pub.xml:xmlStringToXMLNode service to convert the XML string to an XML node.
b. Invoke the pub.xml:XMLNodeToDocument service to convert the XML node to an IData object. When you invoke this service:
*Set the makeArrays input variable to false.
*Set the documentTypeName input variable to pub.flatFile.generate:FFDictionary.
This creates an IData object that conforms to the pub.flatFile.generate:FFDictionary IS document type.
For more information about the pub.xml:xmlStringToXMLNode and pub.xml:XMLNodeToDocument services, see the webMethods Integration Server Built-In Services Reference.
3. Map data to the IData object to make your changes.
4. Convert the IData object to an XML string by invoking the pub.xml:documentToXMLString service. When you invoke this service:
*Set the encode input variable to true.
*Set the documentTypeName input variable to pub.flatFile.generate:FFDictionary.
For more information about the pub.xml:documentToXMLString service, see the webMethods Integration Server Built-In Services Reference.
5. Delete the existing flat file dictionary from the Integration Server namespace by invoking the pub.flatFile.generate:deleteFFDictionary service.
6. Create the flat file dictionary in the Integration Server namespace again by invoking the pub.flatFile.generate:saveXMLAsFFDictionary service.