SynchronizationEventsAPI external object (X Evolution 3)

Every time an offline application generated with GeneXus is installed in the device, an auxiliary table called "GXPendingEvents" is created automatically in the local database.

The GXPendingEvents table will store all Business Component modifications made offline ( Inserts, Deletes, Updates ) as events in order to replicate the same changes later to the server. Each event has an attribute that represents the status of the event. The possible status values are defined by the EventStatus domain:

Values Name Meaning
1 Pending Events with this status are ready to be sent by the device into the server. In addition, these events are created every time a Business Component transaction is executed.
2 ProcessingServer This is a temporary status of an event while it is being processed on the server side.
3 ConfirmedServer This status means that the event was successfully replicated in the server side. Because there is no need to store all confirmed events, they are removed from the GXPendingEvents table instantly.
4 RejectedServer Events with this status could not be replicated in the server side because some error happened. From the device it is possible to access the error code and messages by using the GetEvents method and the "EventErrors" property of the "GxSynchroEventSD".
5 CanceledUser Means that the event was canceled by the user.
6 RejectedFK

When at least 2 insertion events are sent and one of them has a ForeingKey to some of the other events, if that event fails (with status RejectedServer), the event with the ForeingKey fails as well, but with the status RejectedFK.

For instance, if we have a Customer-Invoice model, and we insert a Customer with one Invoice, if for some reason the event associated with the Customer is rejected by the server when replicating, the Invoice event is maked as RejectedFK.

Note: Statuses "ProcessingServer", "ConfirmedServer" and "CanceledUser" are temporary states of an event, and, in addition, every event with some of these statuses is removed from the GXPendingEvents table; which means that only events with status "Pending""RejectedServer" or "RejectedFK" remains in the GXPendingEvents table.

The Synchronization Events API has methods that makes possible to access and manipulate the GXPendingEvents data.

This methods are:


Events with status "RejectedFK" are only supported by Apple Smart Devices (iOS) offline applications as of GeneXus X Evolution 3 Upgrade 1.

See also