Routing file formatter
A routing file formatter is a Java™ class that generates a custom routing file string. To create a custom routing file, you must implement a unique formatter class and then define the class and routing file schema name. The class and routing file schema name are defined on the edit transmission definition page.
Define the formatter class in the shared library directory for Services Framework. The formatter class must implement the
RouteFileFormatterInterface interface that is available in the
com.ibm.paydir.rtefile.formatter package.
RouteFileFormatterInterface contains the following method:
public String processXML(String baseRte, HashMap custAttr,
HashMap appObj, String schema)
throws FormatterException; The following table describes the parameters for this method.
| Parameter name | Type | Description |
|---|---|---|
| baseRte | String | The routing XML created by the task. |
| custAttr | HashMap | The custom attributes are defined at the transmission definition or at the global level. This map contains the name value pairs of these custom attributes. |
| appObj | HashMap | The following business objects are available in the map as name value pairs:
|
| schema | String | This parameter is used to provide an XML schema to validate the XML generated by the custom formatter. |
processXML returns the XML from the new custom routing file as a Java string. If it does not create the custom routing file, a
FormatterException occurs and is logged. If this exception occurs, the original routing file
is used.
The call to the formatter is timed, logged, and printed with the other file timing values.