SynchronisationBean

From
Jump to: navigation, search

Description

This is the super class for all synchronisation data beans. It contains the common sync data fields necessary for marking various data records as synched, and allows the attachment of organisation specific custom data for each sync record.

The subclasses which inherit these fields are : CustomerSynchronisationBean, JobSynchronisationBean, ResourceSynchronisationBean, UserSynchronisationBean and EventSynchronisationBean

A data record on EService is considered synchronized for a specific Synchronisation ID (flag), so long as the update index of the data record matches the updateindex in the flag sync record. When the data record is updated (such as a customer getting updated address details, or a job being progressed to a new state), the data records' update index will change, while the sync records' update index will not, resulting in the data record being considered to be "unsynchronized".

When marking a record on EService as "synchronized", you must pass back one of the Synchronisation sub classes, which will include a primary key of some sort, to identify the data record to be marked, and an update index copied from the data record. There after, the marked data record will be considered "synched" until the update index of the data record changes due to the record being changed or updated in some way. The data record will then be "unsynched" again, and will be returned via the getUnsynchedXXXXX type methods until marked as "synched" again.

The SynchronisationBean, and its sub classes, also contain a synchronisationID field. This is the name of the "flag" used to store the sync data record. The use of different flag names allows external systems to mark the EService data records as "synched" or "unsynched" for a variety of purposes at the same time. For example, a particular job record might be marked as "synched" using a flag name of "Invoiced" to indicate the job has been entered into an accounting package, but marked as "unsynched" (i.e. has different data record and sync record update indexes) using a flag name of "Exported" to indicate it has not yet been exported to an external job management system.

Finally, the SynchronisationBean also allows for the storing of two custom fields along with the above data. The fields are synchronisationReference and synchronisationData. These fields may be used for any purpose, to allow the external system to store custom data relating to the external use of the EService data records.

Fields

The data fields of this object.

Name Type Size Required Description
updateIndex int 10 Yes A copy of the update index from the record you are marking as "synched".
synchronisationID String 30 Yes The name of the "flag" to use to search for whether a particular record has been marked as "synched" or not. It is usual to use the name of the organisation as the synchronisationID.
synchronisationReference String 30 No Some form of external reference the external system wishes to store on the EService server, relating to the successful marking of this record as "synched".
synchronisationData String 50 No Some form of external data value the external server wishes to store on the EService server.
Personal tools
MediaWiki Appliance - Powered by TurnKey Linux