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 Entry
 
Modifying an Existing Flat File Dictionary Entry
To modify an existing flat file dictionary entry, you first retrieve from the Integration Server namespace the dictionary entry that you want to modify. You make your modifications to the data; then invoke the appropriate service to write the changes back to the Integration Server namespace. The following describes the basic steps to modify a dictionary entry either using an XML file or mapping data.
Using this method
Follow this procedure
XML File
1. Retrieve the existing information for the dictionary entry from the Integration Server namespace by invoking the pub.flatFile.generate:getFFDictionaryEntryAsXML 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 dictionary entry 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. Update the dictionary entry in the Integration Server namespace by invoking the pub.flatFile.generate:updateFFDictionaryEntryFromXML service.
Mapping Data
1. Retrieve the existing information for the dictionary entry from the Integration Server namespace by invoking the pub.flatFile.generate:getFFDictionaryEntryAsXML 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:XMLNodeToDocumentservice 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. Update the dictionary entry in the Integration Server namespace by invoking the pub.flatFile.generate:updateFFDictionaryEntryFromXML service.