addListener


Purpose

Adds a listener to the Client Store service.

Signature

addListener( callbacks )

Returns

This method does not return anything.

Parameters

Name Description Type Use
callbacks An object where all the callbacks are defined. object required

The addListener method's callbacks object is structured as follows:

{
  onStatusUpdate: function( status ) {...}
}

The onStatusUpdate callback receives the status JSON object as its call parameter representing the current Store and Forward process status, consisting of:

Name Description Type
busy Represents the Client Store service's state: "true" if synchronization is running and "false" if it is idle. boolean
event Defines event that caused the Client Store's status update as defined in the Constants table in the Client Store article. Undefined if no status update has occurred. constant
upsertedItems A map of types registered with "reportChangesForTypes" vs. arrays of handles of all inserted or updated synchronization items. Undefined for events other than SUCCEEDED. object
deletedItems A map of types registered with "reportChangesForTypes" vs. arrays of handles of all deleted synchronization items. Undefined for events other than SUCCEEDED. object
wasFullSync A value that is set to true if the MapsReplication operation includes a FullSyncCommand. boolean
lastErrorCode Specifies the type of error of last failure as defined in the Constants table in the Client Store article. Undefined if no error has occurred. Updated accordingly by SUCCEEDED or FAILED events. constant
lastErrorMessage Represents a human-readable description of the type of failure. Updated accordingly by SUCCEEDED or FAILED events. string

Related topics

Client Store
Legal notice | Copyright © 2015 and Confidential to Pegasystems Inc. All rights reserved. | Feedback
Advanced...