Business Object Document Sync processing pattern

The Business Object Document Sync processing pattern is used by systems that contain master data records to push out notifications when their data has changed. The Sync request contains the updated version of the business object and the request is sent out to all other listening systems to update their version of the business object.

Although the purpose of a Sync request is for systems to synchronize information pertaining to the business object, the processing pattern for Sync request is similar to the Change processing pattern. When processing the Sync request, the system updates its copy of the business object with the data from the Sync request. The Sync request will contain actions of what triggered the message to be sent and these actions correspond with the actions of a change request. In some cases, additional business logic is required but this business logic may be different then the actual change logic – for example, auditing or logging. When additional business logic is needed, a Post Sync Noun Part task command can be specified.

BOD Sync processing pattern

The following describes the detailed flow of the processing pattern:

  1. The Sync noun controller command breaks down the BOD and calls the read() to resolve the root objects of the nouns to Sync.
  2. The validate() method is called to perform any common validation required.
  3. An access control check is performed to ensure that current user has permission to Sync the specified noun.
  4. The Sync noun part task commands are instantiated and for each command, the validate() method is executed to report potential errors that can occur during processing.
    1. The Sync noun part command will read any information required and validate the input.
  5. The Sync noun part task command is executed to perform the change.
    1. The Sync noun part applies the changes.
    2. The Sync noun part saves any changes made to data objects retrieved in the current instance of the command.
  6. The post Sync noun part command is instantiated and executed.
    1. More data is read.
    2. Other data may be changed.
    3. Any changes are saved.
  7. The save is called on the object retrieved in step 1.
  8. The response is created and returned.