Conflict Handling for Complex Server Requests

If your server requests are large and combined with complex business logic, they may take a long time until the server returns the commitment to the client. If the client does not receive or cannot process the commitment from the server (e.g. due to of the network connection loss), data inconsistencies can occur as the client tries to resend the request.

The following logic was implemented to solve this problem:

  1. The client numbers each request and sends the numbers to the server.
  2. The server stores each request number for each device and the IDs of the last request's affected records.
  3. If the client sends a request number that already exists on the server, only IDs of changed records are transferred.
  4. If the server request results in a conflict, a new request number is created.

To configure this logic:

  1. Create a new info area with the following fields in the Aurea CRM data model:
    • RequestNumber (type: integer)
    • RequestInformation (type: text [as large as possible])
    • RepId (type: integer)
    • LoginName (type: text, min. 12 characters)
    • ChildNumber (type: integer)
    • ParentKey (type: text, min. 32 characters)
  2. Add a new field group to this info area and define the Edit control as follows:
    Field Function
    RequestNumber RequestNumber
    RecordIds RecordIds
    LoginName LoginName
    RepId RepId
    ChildNumber ChildNumber
    ParentKey ParentKey
  3. Add the field group name to the new System.RequestControl Web Configuration parameter (this parameter is not included in the default configuration).