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 include the Workflow UserID, object type Reference Name, the object Reference ID, and a full stack trace for the error. Information messages are displayed similarly. With administrative privileges, users also can clear the log.
Note: The error log table is auto-trimmed (delete records) if it exceeds a 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 can 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 errors and information messages to 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 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 Error Provider For FlowWright
FlowWright provides the ability to use your 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 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:
C:\inetpub\wwwroot\cDevWorkflow\cDevWorkflowLog.xml