A fetch definition supports the exchange data model of synchronization.
A fetch defines how
SAP Mobile Platform Server synchronizes data for a
target object collection. This object collection must be a
top-level collection within the module. A fetch is made up of
steps that retrieve the data for the collection from the
back-end
system. These steps are grouped into three categories within the
Fetch definition: Client Exchange Steps, Server Exchange Steps,
and Removal Steps. A fetch may also include properties to store
data captured from the user and validation rules for those
property values.
A
fetch may be a main or non-main fetch. A main fetch is processed
during every transmit between the Agentry
Client and
Server. A given module may contain multiple main fetches. The order
in which multiple main fetches, either within the same module or
within multiple main fetches, are processed is undefined and should
therefore not be a factor in the synchronization logic.
A
non-main fetch will only be executed when an action step of type
transmit explicitly defines such a fetch to be processed. Non-main
fetches are normally defined to provide the search functionality to
end users.
The basic structure of a fetch definition is intended
to support the exchange data model of synchronization. This model
is intended to allow for the synchronization of data in a more efficient manner,
where only data changes on the back end system as compared to the
current data on a given client are retrieved. Any data that has
not been changed as compared to the client’s data is not retrieved.
A
fetch definition can be defined to retrieve new object instances
to be added to a client application, replace existing objects on
that client, a remove any objects the client should no longer store
locally. The read steps of the object type targeted by the fetch
are run after the fetch has been processed and may also retrieve
objects for the client to either add them or replace existing instances.
Fetch Child Definitions
- Property: A fetch property defines data to be captured on
the Agentry
Client for use during fetch processing by
SAP Mobile Platform Server.
- Validation Rule: A fetch validation
rule defines what rule definition will be used to validate the fetch’s data
and how failed validation is handled on the Agentry
Client.
- Client Exchange Step: A fetch client exchange step defines how
information about the target collection is processed by
SAP Mobile Platform Server.
- Server Exchange Step: A fetch server exchange step defines how
information about the
back-end
system’s data is processed.
- Removal Step: A fetch
removal step is defined to determine which objects should be removed
from the collection targeted by the parent fetch.
Fetch Attributes
- Collection: This
attribute references the object collection property within the same module
and that is a direct child of the module main object for which the
fetch will synchronize data. Steps executed by the fetch’s child
step usage definition will be processed by the Agentry
Server in
the context of this collection.
- Name: This attribute contains the name that identifies
the fetch. This value must be unique among all fetch definitions
within the same module.
- Display Name: This attribute contains the value that
identifies the fetch on the client. This is displayed during synchronization
in the Client’s Transmit Screen when the fetch is processed by the
Server.
- Clear Collection: This attribute specifies whether or
not the object instances stored in the targeted collection should
be removed from the Client prior to processing the fetch during
synchronization. This attribute is normally only left set on when
the fetch is either not using the exchange data model for synchronization,
or when it is a non-main fetch performing search functionality and
the previous search results should be removed from the client before
performing a new search.
- Main Fetch: This attribute specifies whether the fetch
is a main fetch. When checked, the fetch will be processed during
every transmit between the Client and Server. When unchecked, the
fetch will only be run when an action step of type Transmit explicitly
lists the fetch to be processed and that action step is the one
that initiates the transmit.