Developer

Service Event

A service event defines data synchronization.

A service event defines how SAP Mobile Platform Server synchronizes data between two back-end systems. A service event normally performs such a synchronization when a change or “event” occurs in a source back-end system that must be reflected in a destination back-end system. Depending on its type, a Service Event can either actively poll a back-end system, or listen to the source back end for messages notifying it of a change. A service event targets an object collection to facilitate this data transfer, with the object instances in that collection storing the data retrieved from the source back end. The synchronization processing of a service event does not involve or affect any Agentry Clients.

The service event creates object instances based on data retrieved from the source back-end system. It then updates this object data to the destination back-end system. The components of the service event that retrieve data from the source back end differ for each service event type. The child definitions to update the destination back end are the same set of step usage definitions for all service event types.

You can define these types of service events:
  • Poll With Step: A Poll With Step service event type references a step definition that is run by SAP Mobile Platform Server periodically to actively poll the source back-end system for data changes.
  • Java Callback: A Java Callback service event type includes a Java code component that is an extension of the ServiceEvent Agentry Java API class that allows a the source back-end system to call into SAP Mobile Platform Server as a notification of a modification to that back-end system’s data.
  • OData Message Received: An OData message received service event type includes XML message mappings that maps messages sent from the source back-end system to SAP Mobile Platform Server to indicate data has changed in that back-end system.
  • HTTP-XML Message Received: An HTTP-XML message received service event type includes XML message mappings that maps messages sent from the source back-end system to SAP Mobile Platform Server to indicate data has changed in that back-end system.
  • File System Monitor: A File System Monitor service event type is defined to monitor a specified directory on the SAP Mobile Platform Server host file system for changes and includes document mappings to map data in that directory’s files to the properties of the service event’s target object type.

Service Event Child Definitions

While each service event type has different components to capture data changes in the source back end system, all service event types contain the same child definitions to update the destination back end system:
  • Read Step: A service event read step references a step definition run to retrieve any additional data for the target object collection from the source back-end system.
  • Data State Step: A service event data state step references a step definition run to check for data collisions in the destination back-end system before the service event makes any changes to it.
  • Update Step: A service event update step references a step definition run to update the destination back-end system with data stored in the service event’s target object collection.
  • Error Handling Step: A service event error handling step references a step definition run only when one of the other service event child step usage definitions returns an error.

Service Event Attributes

The attributes for a service event vary depending on the service event type. See the service event type-specific information for details on these attributes.