Error Handling

When an error occurs while saving a record to the ProCount or Explorer the failed records are stored on the server for research and resolution. The user receives a message that there has been a problem, but the resolution of the problem is up to the administrator to fix.

This design has come from the experience of assisting companies work through problems with data sync processes. The goals of the design are:

1. To not lose the data and

2. To keep the end user from having to deal with a problem that he has no real ability to resolve.

For example, if there is a trigger on the database that is failing when a record is inserted, the end user in the field would not be able to resolve the problem and should not have to pause his workday while someone else solves the problem. Therefore, in Field Operator: Explorer Edition, errored records are stored on the server and the end user is not responsible for attempting to resolve the problem.

Records that failed to save to the database are stored in the following folder:

{Field Operator Home}\Field Operator Data\{InstanceName}\MobileClients\Uploads\Errors

Files from this folder can be moved to the parent folder …MobileClients\Uploads and the server will re-process them. Only failed records are stored here, so administrators will know exactly what failed and will not reprocess records that succeeded.

Walkthrough: An error occurs while saving a completion daily record

In one of our test environments, we have a custom stored procedure missing which causes a database error.

The user enters a completion daily record and a tank daily record and publishes the data.

Graphical user interface, application, table, Excel Description automatically generated

The server receives these records and one of the records fails.

The failed record is stored in the Errors Folder:

Graphical user interface, text, application Description automatically generated

This file contains the record in JSON format (viewable using a tool such as Visual Studio Code), which helps administrators decipher exactly which record type, Merrick ID, and date had a problem.

Text Description automatically generated

The user receives a prompt about the failed record but, since they likely cannot solve the problem, they are informed that the system administrator will work to resolve the problem.

In this case, after the administrator corrects the stored procedure, they can move all affected files from the Errors folder back to the Uploads folder and the server will re-process the user’s data and successfully insert the records.

Comments are closed