Fields
Field and Field Map configuration records are elements that simplify and bring additional functionality when configuring Messages & Message Scripts and facilitate the auto-generation of documentation.
Introduction
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.
Definition
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.
Inheritance
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 .
The ‘Integration’ field is mandatory for all Field records, meaning that a Field record must always be linked to an Integration.
A Message level Field record can inherit from its Integration level counterpart by simply checking the ‘Inherit’ field.
Configuration
‘Field’ configuration
The fields to be configured for the Field record are as follows:
Field
Type
Description
Field map
Reference
The Field Map this Field record is linked with.
Map to field
Boolean
Use this Field record to represent a field on a source/target table.
Table*
Table name
The primary source/target table that this Field record is mapped to.
Element*
Field name
The field on the source/target table this Field record is mapped to.
Path
String
Where in the payload the data will be placed.
Property
String
The property in the payload the data will be written to.
Application
Reference
Application containing this record.
Integration
Reference
The Integration this Field record belongs to.
Message
Reference
The Message this Field record is linked with.
Domain
Reference
The domain this record is in.
Active
Boolean
Set to true to use this Field record for processing (Inactive Fields will be ignored when building the Message Scripts).
Name
String
The name of the Field record (auto-populated from the Table & Property fields).
Description
String
The description of this Field record.
*These fields are visible when ‘Map to field’ is set to true
‘Mapping options’ configuration
The Mapping options fields to be configured for the Field record are as follows:
Field
Type
Description
Inbound
Boolean
Set to true to use for inbound Messages.
Outbound
Boolean
Set to true to use for outbound Messages.
Depends on
Glide list
Specify the Field records that must be processed before this Field record is processed.
Mandatory
Boolean
Set to true to make the Field mandatory.
Inherit
Boolean
Set to true to have the Message level Field record inherit from its Integration level counterpart.
Order
Integer
Specify the order of processing.
Default inbound*
Script plain
Script for returning the default inbound value.
Default outbound*
Script plain
Script for returning the default outbound value.
*Default inbound/outbound: For a list of available variables, click here.
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 Processing
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.
Last updated