Adding these elements to the Unifi configuration records brings a wealth of advantages. In the past, each Message Script has been maintained individually and manually. However, the introduction of Fields and Field Maps allows Message Scripts to be broken down into smaller, reusable components. Having these Field records also means we can easily view and manage the use of fields on Messages and Integrations.
A Field record defines the processing of a discrete component of a Message. Although the Field record is distinct from and separate to the field element of a form, it often represents the handling of an individual field on the source/target record (e.g. Short description). Not only that, a Field record is used to define the objects that will carry other Transaction specific data (e.g. Name, Time stamp, Source reference, Target reference).
A Field record identifies the field of a source/target record (optional - as stated above), the element used to stage the information and the property of the payload exchanged between systems. It can define the direction in which it is applied, any default values to use in each direction and whether it is mandatory. It can exist at the Integration or Message level (more on that in the Inheritance section). The behaviour, or ‘type’ of a Field is defined by the Field Map to which it is linked.
Field inheritance allows a Field record to be created at the Integration level rather than at an individual Message level. Individual, Message level Field records can then be configured to inherit their behaviour from the Integration level Field record.
For example, if a field is used by ten Messages, then we would define ten Field records and link them to the Messages (a separate Field record must be created for each of the Messages where the field is used). If we configure those Field records to inherit their behaviour from the Integration level Field record, then modifications made to the Integration level would immediately be available to the Message level Field records.
A Field record is shown to be an Integration level record when it is not linked to a specific Message i.e. the ‘Message’ field is left blank .
A Message level Field record can inherit from its Integration level counterpart by simply checking the ‘Inherit’ field.
The fields to be configured for the Field record are as follows:
The Field Map this Field record is linked with.
Map to field
Use this Field record to represent a field on a source/target table.
The primary source/target table that this Field record is mapped to.
The field on the source/target table this Field record is mapped to.
Where in the payload the data will be placed.
The property in the payload the data will be written to.
Application containing this record.
The Integration this Field record belongs to.
The Message this Field record is linked with.
The domain this record is in.
Set to true to use this Field record for processing (Inactive Fields will be ignored when building the Message Scripts).
The name of the Field record (auto-populated from the Table & Property fields).
The description of this Field record.
The Mapping options fields to be configured for the Field record are as follows:
Set to true to use for inbound Messages.
Set to true to use for outbound Messages.
Specify the Field records that must be processed before this Field record is processed.
Set to true to make the Field mandatory.
Set to true to have the Message level Field record inherit from its Integration level counterpart.
Specify the order of processing.
Script for returning the default inbound value.
Script for returning the default outbound value.
The image below is an example of an ‘incident.short_description’ Field record:
We can see an example from this list view below that the incident.short_description Field record has been defined for seven different Messages on this Integration (plus the Integration level record):
Fields and Field Map records are not processed during the operational phase (run time) of the Integration. They are processed by a Build process (triggered by a UI action) which takes the information in the records and produces the code which defines the Message Scripts. The Build activity can be performed on an individual Message, or for the entire Integration.
At run time only the Message Scripts are executed and the Field and Field Map records are not accessed at all. This means there is no operational difference between an integration built using Fields and Field Maps and an integration built without.
Next, we will look at Field Maps in more detail.