As with any software, error handling and information message handling can be very helpful. FlowWright provides error and information message handling in several areas of the application.
These messages are stored in FlowWright’s system log which can be accessed through the “Status” menu item.
The above UI will render last 10 messages by default. Using the “View Log By” drop down, error handling and information messages can be viewed for various date ranges. The message header includes priority, date created, error source and the message. Clicking on a message row will expand its details.
The detail view shows includes the Workflow UserID, object type Reference Name, the object Reference ID, and a full stack trace for the error. Information messages display in a similar way. With administrative privileges, users also have the ability to clear the log.
Note: The error log table is auto trimmed (delete records) if it exceeds certain size. This scheduled job is defined on the server and is event triggered by the growing table size.
API Error messaging
All API calls to FlowWright are able to return the last error from the API. With any of the API objects, use the “errorMsg” property to get the last generated error message.
public string errorMsg; deDesign oDE = new deDesign(“connectionString”, “userID”, null); string sError = oDE.errorMsg;
Using the API to log messages
The API can be used for logging error and information messages to the FlowWright’s log. Before making the API call, an error provider object must be created. Since FlowWright provides the ability to define and use custom error providers, let’s use the default error provider that logs messages to the FlowWright’s log database table.
clsDBErrorProvider oErrProvider = new clsDBErrorProvider("connectionString");
deDesign oDE = new deDesign(“connectionString”, “userID”, oErrProvider);
modGlobal.writeError(oErrorProvider, "source", "message", "stackTrace", priorityLevel);
It’s also possible to use the direct methods of the error provider to log errors and messages.
Implementing Your Own Error Provider For FlowWright
FlowWright provides the ability to use your own custom error provider. By implementing a simple interface (IErrorProvider) and passing the error provider object to FlowWright's API calls, the custom error provider will be used for error and message logging within FlowWright.
FlowWright Engine errors
The FlowWright engine services use the Windows event logging, FlowWright system log and a file system based log to log any error handling messages related to the service execution. For engine service startup and shutdown, events are logged to the Windows event log. When the engines are processing items within FlowWright, they use the FlowWright's system log to log errors or information. If the engines have database connection issues reported by the data access layer, these issues are logged to a log file within the main directory of FlowWright: