Introduction

The message upload process takes a number of parameters designed to convert the financial format to an AvantGard Trax-suited model. The different formats and parameters are listed in the format annex and contained in Message > FormatFactory > Format Definition.

The general tab contains general format information. The other tabs are where an integrator can plug-in rules, classes or scripts to perform custom actions between each of the steps of a upload or write workflow.

Typical read and write rules will be removed of SWIFT header information or converting between single-line and multiline formatting with the help of carriage returns.

General

Figure 131 Format Definition

Field Required Content
Code Y a code that has to be unique for each format definition. The definition will be looked up using this code.
Description N A description of the kind of format.
Country Code recommended In the GUI, there is a menu bar. (Upload > Formats for...) A certain security profile configuration can have menu actions to upload certain formats. The country code will be used to locate the actions in that menu.
Structure Y The IOpack Structure responsible for reading/writing/validating will be instantiated from this character sequence
In Mapper recommended If you want to define the full upload process, you need to specify the input mapper in this field. In some cases the format definition can only be used to parse and validate with- out mapping to the model. Alternatively, maybe the format only needs to be used to write from a model to the format.
Out Mapper recommended If you want to define the full write process, you need to specify the output mapper in this field. Again, as for the in- put mapper, only parsing and writing might be necessary or only reading to a AvantGard Trax model.
Entity N To which entity of a model the format will be mapped. For informational purposes only.

Table 131 Format Fields

Pre Read/In/Out Map and Write Strategy

The chosen type of strategy determines what has to be filled out.

When the type is Java, you need to specify the Java class that is going to do your custom action. Depending the tab you selected, your class should implement a certain interface:

Pre Read Strategy: com.trax.core.formats.StringProcessingInterface. In this class you have to implement the method String process(String). The input will be the file contents before parsing.

Pre In Map Strategy: com.trax.core.formats.StructureProcessingInterface. In this class you have to implement the method Structure process(Structure). The input will be the IOpack structure after parsing and right before mapping.

Pre Out Map Strategy: com.trax.core.formats.ValueObjectProcessingInterface. Now you have to implement the ValueObject process(ValueObject) method. The input will be a value object right before it is mapped. This is where usually conversion takes place.

Pre Write Strategy: com.trax.core.formats.StringProcessingInterface. In this class you have to implement the method String process(String), like with the Pre Read Strategy. However, in this you will have the character sequence generated after mapping and writing.

When the type is Script, you have to put a Groovy script in the Script tab. Depending on which strategy you are implementing, you will have other input. See the previous paragraph about the Java classes to know the input and output of your script.

When the type is Rule, you have to implement a rule sequence. Again the input and output depend on which strategy you are configuring.

Figure 132 Example of a pre-read strategy script